{"id":19383161,"url":"https://github.com/haixuxu/gwk","last_synced_at":"2025-04-23T20:32:37.622Z","repository":{"id":187515500,"uuid":"677024314","full_name":"haixuxu/gwk","owner":"haixuxu","description":"A fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet.","archived":false,"fork":false,"pushed_at":"2024-05-01T17:13:47.000Z","size":142,"stargazers_count":16,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-02T20:11:49.615Z","etag":null,"topics":["expose","frp","gwk","nat","ngrok","nodejs","proxy","reverse-proxy","tunnel"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"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/haixuxu.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","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}},"created_at":"2023-08-10T15:00:16.000Z","updated_at":"2024-05-01T17:13:51.000Z","dependencies_parsed_at":"2023-08-15T05:27:26.568Z","dependency_job_id":"bdee3157-8eea-433c-8e3c-e6cef3ff5718","html_url":"https://github.com/haixuxu/gwk","commit_stats":null,"previous_names":["xuxihai123/gank","xuxihai123/gwk","haixuxu/gwk"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haixuxu%2Fgwk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haixuxu%2Fgwk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haixuxu%2Fgwk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haixuxu%2Fgwk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/haixuxu","download_url":"https://codeload.github.com/haixuxu/gwk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250509906,"owners_count":21442520,"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":["expose","frp","gwk","nat","ngrok","nodejs","proxy","reverse-proxy","tunnel"],"created_at":"2024-11-10T09:24:47.984Z","updated_at":"2025-04-23T20:32:36.923Z","avatar_url":"https://github.com/haixuxu.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gwk\n\nGwk is a tool that helps you expose your local servers or services to the\ninternet, even in a private network. \n\n# wiki\n\n[Wiki](https://github.com/xuxihai123/gwk/wiki)\n\n# Feature\n\n- support tcp port expose\n- support subdomain expose http server\n- support udp port expose \n- support stcp expose with two peer\n\n# install\n\n```bash\nnpm install -g gwk\n```\n\n# usage\n\nserverHost default is `gank.75cos.com`\n\n```bash\n# example 1 , detault dispatch to 127.0.0.1:8080\ngwk\n```\n\n# client more  example\n\n```bash\n# example 2\ngwk  --port 8080\n# example 3\ngwk  --subdomain testabc001 --port 8000\n# example 4\ngwk  -c client.json\n```\n\nclient.json\n\n```json\n{\n  \"serverHost\": \"gank007.com\",\n  \"serverPort\": 4443,\n  \"tunnels\": {\n    \"tcp001\": {\n      \"protocol\": \"tcp\",\n      \"localPort\": 5000,\n      \"remotePort\": 7200\n    },\n    \"tcp002\": {\n      \"protocol\": \"tcp\",\n      \"localPort\": 5000,\n      \"remotePort\": 7500\n    },\n    \"webapp02\": {\n      \"protocol\": \"web\",\n      \"localPort\": 4900,\n      \"subdomain\": \"app02\"\n    },\n    \"webappmob\": {\n      \"protocol\": \"web\",\n      \"localPort\": 9000,\n      \"subdomain\": \"mob\"\n    }\n  }\n}\n```\n\n# setup a gwk server\n\n```bash\ngwkd  -c server.json\n# start with pm2\npm2 start gwkd --name gwkapp --  -c server.json\n```\n\nserver.json\n\n```json\n{\n  \"serverHost\": \"gwk007.com\",\n  \"serverPort\": 4443,\n  \"httpAddr\": 80,\n  \"httpsAddr\": 443,\n  \"tlsCA\": \"./rootCA/rootCA.crt\",\n  \"tlsCrt\": \"./cert/my.crt\",\n  \"tlsKey\": \"./cert/my.key.pem\"\n}\n```\n\n\n#  develop\n\ngenerate CA \n\n```bash\nnode scripts/createRootCA.js\n```\ngenerate cert\n\n```bash\nnode scripts/createRootByCA.js\n```\n\nstart server\n\n```bash\nexport GWK_SERVER=true\nnpx tsx src/cli.ts -c etc/server.json\n```\n\nstart client\n\n```bash\nnpx tsx src/cli.ts -c etc/client.json\n```\n\n# test dns with custom port\n\n```bash\ndig @127.0.0.1 -p 6666 bbs.75cos.com\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaixuxu%2Fgwk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaixuxu%2Fgwk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaixuxu%2Fgwk/lists"}