{"id":15893597,"url":"https://github.com/alexdlaird/java-ngrok-example-tcp-server-and-client","last_synced_at":"2025-06-14T02:33:21.330Z","repository":{"id":44545221,"uuid":"400255534","full_name":"alexdlaird/java-ngrok-example-tcp-server-and-client","owner":"alexdlaird","description":"TCP Server and Client example for java-ngrok","archived":false,"fork":false,"pushed_at":"2024-04-15T10:31:43.000Z","size":118,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-02T05:50:26.130Z","etag":null,"topics":["education","java","java-ngrok","localhost","localtunnel","reverse-proxy","tcp","tcp-client","tcp-server","tunnel","tunneling","webhook"],"latest_commit_sha":null,"homepage":"https://github.com/alexdlaird/java-ngrok","language":"Java","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexdlaird.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"alexdlaird","patreon":"alexdlaird","custom":["https://www.paypal.me/alexdlaird"]}},"created_at":"2021-08-26T17:40:53.000Z","updated_at":"2024-05-18T00:35:45.153Z","dependencies_parsed_at":"2023-12-20T18:24:15.398Z","dependency_job_id":"eac859c8-1cd0-4646-992a-542d127677a9","html_url":"https://github.com/alexdlaird/java-ngrok-example-tcp-server-and-client","commit_stats":null,"previous_names":[],"tags_count":5,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexdlaird%2Fjava-ngrok-example-tcp-server-and-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexdlaird%2Fjava-ngrok-example-tcp-server-and-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexdlaird%2Fjava-ngrok-example-tcp-server-and-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexdlaird%2Fjava-ngrok-example-tcp-server-and-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexdlaird","download_url":"https://codeload.github.com/alexdlaird/java-ngrok-example-tcp-server-and-client/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244629981,"owners_count":20484291,"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":["education","java","java-ngrok","localhost","localtunnel","reverse-proxy","tcp","tcp-client","tcp-server","tunnel","tunneling","webhook"],"created_at":"2024-10-06T08:12:12.624Z","updated_at":"2025-06-14T02:33:21.318Z","avatar_url":"https://github.com/alexdlaird.png","language":"Java","funding_links":["https://github.com/sponsors/alexdlaird","https://patreon.com/alexdlaird","https://www.paypal.me/alexdlaird"],"categories":[],"sub_categories":[],"readme":"[![Build](https://img.shields.io/github/actions/workflow/status/alexdlaird/java-ngrok-example-tcp-server-and-client/build.yml)](https://github.com/alexdlaird/java-ngrok-example-tcp-server-and-client/actions/workflows/build.yml)\n![GitHub License](https://img.shields.io/github/license/alexdlaird/java-ngrok-example-dropwizard)\n\n# java-ngrok Example - TCP Server and Client\n\nThis is an example project that shows how to easily integrate [`java-ngrok`](https://github.com/alexdlaird/java-ngrok)\nwith a simple TCP Server and Client.\n\n## Getting Started\n\nThis is an example of a simple TCP ping/pong server. It opens a local socket, uses `ngrok` to tunnel to that socket,\nthen the client/server communicate via the publicly exposed address.\n\nThis project will reserve (and then release) its own TCP address using `ngrok`'s API.\n\nBuild the application with:\n\n```sh\nmake build\n```\n\nStart a socket server with:\n\n```sh\nUSE_NGROK=true \\\nNGROK_AUTHTOKEN=\"my-auth-token\" \\\nNGROK_API_KEY=\"my-api-key\" \\\njava -jar build/libs/java-ngrok-example-tcp-server-and-client-1.0.0-SNAPSHOT.jar server\n```\n\nIt’s now waiting for incoming connections, so start a client in another terminal to send it something. Start a socket\nclient with:\n\n```sh\nUSE_NGROK=true \\\nHOST=\"1.tcp.ngrok.io\" \\\nPORT=12345 \\\njava -jar build/libs/java-ngrok-example-tcp-server-and-client-1.0.0-SNAPSHOT.jar client\n```\n\nAnd that’s it! Data was sent and received from a socket via your `ngrok` tunnel.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexdlaird%2Fjava-ngrok-example-tcp-server-and-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexdlaird%2Fjava-ngrok-example-tcp-server-and-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexdlaird%2Fjava-ngrok-example-tcp-server-and-client/lists"}