{"id":18001320,"url":"https://github.com/afshinm/websocket_tls_docker","last_synced_at":"2025-03-26T08:30:34.014Z","repository":{"id":39821997,"uuid":"101041936","full_name":"afshinm/websocket_tls_docker","owner":"afshinm","description":"Docker image of Websocket server, Nginx as reverse proxy over TLS","archived":false,"fork":false,"pushed_at":"2017-08-23T12:07:20.000Z","size":3,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-21T11:50:31.886Z","etag":null,"topics":["docker","docker-compose","nodejs","tls","websocket"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/afshinm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-22T08:47:37.000Z","updated_at":"2024-01-24T14:19:49.000Z","dependencies_parsed_at":"2022-09-01T09:40:27.528Z","dependency_job_id":null,"html_url":"https://github.com/afshinm/websocket_tls_docker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afshinm%2Fwebsocket_tls_docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afshinm%2Fwebsocket_tls_docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afshinm%2Fwebsocket_tls_docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afshinm%2Fwebsocket_tls_docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/afshinm","download_url":"https://codeload.github.com/afshinm/websocket_tls_docker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245618495,"owners_count":20645010,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","nodejs","tls","websocket"],"created_at":"2024-10-29T23:16:56.749Z","updated_at":"2025-03-26T08:30:33.715Z","avatar_url":"https://github.com/afshinm.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Example of Websocket over TLS with Nginx\n\nDocker image of Websocket server, Nginx as reverse proxy + TLS\n\n\n## Requirements\n\nYou need to have the latest version of Docker installed (+ docker-compose).\n\n\n## Setup\n\n### Step 1\n\nThe first step is adding `ws.example.com` to your `/etc/hosts` and point it to `127.0.0.1` (or your Docker host IP, if it's not your local machine)\n\nWe will use this fake domain to send the requests on a local machine.\n\n### Step 2\n\nIf you to test it on your local machine, you need to create a self-signed SSL certificate.  \n\nHere is a example of how to generate a self-signed certificate: https://gist.github.com/jessedearing/2351836\n\nPlease note that you have to generate the certificate for `ws.example.com`. After generating the certificates, save them to `./cert` with this convention: `ws.example.com.key` and `ws.example.com.cert`.\n\n## Run\n\nGo to the root directory and run:\n\n```\ndocker-compose up --build\n```\n\nThen, you should be able to see the traditional ping-pong message between client and the server in your terminal, like so:\n\n```\nws.client         | starting connection to ws...\nws.client         | connection opened.\nws.example.com    | server received a new connection\nws.client         | client received: pong\nws.example.com    | server received: ping\nws.client         | client received: pong\nws.example.com    | server received: ping\nws.client         | client received: pong\nws.example.com    | server received: ping\nws.client         | client received: pong\n```\n\nThis connection is _kinda_ secure (it connects to `wss://ws.example.com`)\n\n\n## License\n\nUnlicensed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafshinm%2Fwebsocket_tls_docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fafshinm%2Fwebsocket_tls_docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafshinm%2Fwebsocket_tls_docker/lists"}