{"id":20234297,"url":"https://github.com/fffaraz/gotcpproxy","last_synced_at":"2025-04-10T18:32:13.624Z","repository":{"id":64887523,"uuid":"578002455","full_name":"fffaraz/gotcpproxy","owner":"fffaraz","description":"TCP over TLS Proxy in Go","archived":false,"fork":false,"pushed_at":"2024-05-29T05:56:20.000Z","size":50,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T16:11:10.468Z","etag":null,"topics":["go","golang","proxy","socks5","tcp","tls"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/fffaraz/gotcpproxy","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fffaraz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"fffaraz","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2022-12-14T02:45:37.000Z","updated_at":"2024-10-04T12:09:54.000Z","dependencies_parsed_at":"2023-02-19T02:46:10.392Z","dependency_job_id":null,"html_url":"https://github.com/fffaraz/gotcpproxy","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fffaraz%2Fgotcpproxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fffaraz%2Fgotcpproxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fffaraz%2Fgotcpproxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fffaraz%2Fgotcpproxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fffaraz","download_url":"https://codeload.github.com/fffaraz/gotcpproxy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248271812,"owners_count":21075800,"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":["go","golang","proxy","socks5","tcp","tls"],"created_at":"2024-11-14T08:09:46.869Z","updated_at":"2025-04-10T18:32:13.605Z","avatar_url":"https://github.com/fffaraz.png","language":"Go","funding_links":["https://github.com/sponsors/fffaraz"],"categories":[],"sub_categories":[],"readme":"# GoTCPproxy\nTCP over TLS Proxy in Go\n\n## Generate certificates\n```\nfor i in {1..3}; do\n    openssl genpkey -algorithm ed25519 -out $i.key\n    openssl req -new -x509 -sha256 -key $i.key -out $i.crt -days 3650 -subj '/CN=localhost' -addext 'subjectAltName=DNS:localhost,IP:127.0.0.1'\ndone\n```\n\n## Build\n```\nCGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags \"-s -w\" .\nCGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -trimpath -ldflags \"-s -w\" .\nCGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -trimpath -ldflags \"-s -w\" .\n```\n\n## Install\n```\ngo install github.com/fffaraz/gotcpproxy@latest\n```\n\n## Use case 1\nclient \u003c--(plain)--\u003e GoTCPproxy (local) \u003c----(TLS)----\u003e GoTCPproxy (remote) \u003c--(plain)--\u003e target\n```\n./gotcpproxy.exe -local-port 8080 -remote-addr 127.0.0.1:8081 -local-crt cert/1.crt -local-key cert/1.key -remote-crt cert/2.crt -remote-tls\n./gotcpproxy.exe -local-port 8081 -remote-addr 192.168.1.2:22 -local-crt cert/2.crt -local-key cert/2.key -peer-crt cert/1.crt -local-tls\n```\n\n## Use case 2\nclient \u003c--(plain)--\u003e GoTCPproxy (local) \u003c----(TLS)----\u003e GoTCPproxy (middle) \u003c----(TLS)----\u003e GoTCPproxy (remote) \u003c--(plain)--\u003e target\n```\n./gotcpproxy.exe -local-port 8080 -remote-addr 127.0.0.1:8081 -local-crt cert/1.crt -local-key cert/1.key -remote-crt cert/2.crt -remote-tls\n./gotcpproxy.exe -local-port 8081 -remote-addr 127.0.0.1:8082\n./gotcpproxy.exe -local-port 8082 -remote-addr 192.168.1.2:22 -local-crt cert/2.crt -local-key cert/2.key -peer-crt cert/1.crt -local-tls\n```\n\n## Use case 3\nclient \u003c--(plain)--\u003e GoTCPproxy (local) \u003c----(TLS)----\u003e GoTCPproxy (middle) \u003c----(TLS)----\u003e GoTCPproxy (remote) \u003c--(plain)--\u003e target\n```\n./gotcpproxy.exe -local-port 8080 -remote-addr 127.0.0.1:8081 -local-crt cert/1.crt -local-key cert/1.key -remote-crt cert/2.crt -remote-tls\n./gotcpproxy.exe -local-port 8081 -remote-addr 127.0.0.1:8082 -local-crt cert/2.crt -local-key cert/2.key -peer-crt cert/1.crt -remote-crt cert/3.crt -local-tls -remote-tls\n./gotcpproxy.exe -local-port 8082 -remote-addr 192.168.1.2:22 -local-crt cert/3.crt -local-key cert/3.key -peer-crt cert/2.crt -local-tls\n```\n\n## Use case 4\nclient \u003c--(plain)--\u003e GoTCPproxy (logger) \u003c--(plain)--\u003e target\n```\n./gotcpproxy.exe -local-port 8080 -remote-addr 192.168.1.2:22 -log-data\n```\n\n## Use case 5\nclient \u003c--(plain)--\u003e GoTCPproxy (local) \u003c----(Zip)----\u003e GoTCPproxy (remote) \u003c--(plain)--\u003e target\n```\n./gotcpproxy.exe -local-port 8080 -remote-addr 127.0.0.1:8081 -remote-zip\n./gotcpproxy.exe -local-port 8081 -remote-addr 192.168.1.2:22 -local-zip\n```\n\n## HTTP/SOCKS5 Proxy\n```\ndocker run -it --rm -p \"127.0.0.13128:3128\" ginuerzh/gost:latest -L=\":3128?whitelist=tcp:*:80,443\u0026dns=1.1.1.2\"\n```\n\n## Docker compose\n```\ndocker-compose -f docker-compose.client.yml up\ndocker-compose -f docker-compose.middle.yml up\ndocker-compose -f docker-compose.server.yml up\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffffaraz%2Fgotcpproxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffffaraz%2Fgotcpproxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffffaraz%2Fgotcpproxy/lists"}