{"id":13564837,"url":"https://github.com/wzshiming/bridge","last_synced_at":"2025-04-04T08:03:29.416Z","repository":{"id":49398256,"uuid":"93021487","full_name":"wzshiming/bridge","owner":"wzshiming","description":"Bridge is a multi-level proxy that supports clients and servers with multiple protocols. SSHProxy, HTTPProxy, Socks4, Socks5, Shadowsocks.","archived":false,"fork":false,"pushed_at":"2025-03-13T02:07:50.000Z","size":1516,"stargazers_count":180,"open_issues_count":10,"forks_count":20,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-28T07:02:03.697Z","etag":null,"topics":["bridge","go","golang","http-proxy","https-proxy","proxy","proxycommand","shadowsocks","socks4","socks4a","socks5","socks5h","ssh","ssh-proxy","ssh-proxycommand","tcp","tcp-proxy"],"latest_commit_sha":null,"homepage":"","language":"Go","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/wzshiming.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}},"created_at":"2017-06-01T05:54:26.000Z","updated_at":"2025-03-16T18:00:25.000Z","dependencies_parsed_at":"2023-02-16T22:46:05.070Z","dependency_job_id":"990001db-07b8-4383-a6a6-59a6ccc45e2f","html_url":"https://github.com/wzshiming/bridge","commit_stats":{"total_commits":202,"total_committers":4,"mean_commits":50.5,"dds":"0.034653465346534684","last_synced_commit":"a34e5e94768634c5fc4deb0cf7dd1b397825924b"},"previous_names":[],"tags_count":80,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wzshiming%2Fbridge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wzshiming%2Fbridge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wzshiming%2Fbridge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wzshiming%2Fbridge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wzshiming","download_url":"https://codeload.github.com/wzshiming/bridge/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247136490,"owners_count":20889666,"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":["bridge","go","golang","http-proxy","https-proxy","proxy","proxycommand","shadowsocks","socks4","socks4a","socks5","socks5h","ssh","ssh-proxy","ssh-proxycommand","tcp","tcp-proxy"],"created_at":"2024-08-01T13:01:36.765Z","updated_at":"2025-04-04T08:03:29.402Z","avatar_url":"https://github.com/wzshiming.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Bridge\n\nBridge is a TCP proxy tool Support http(s)-connect socks4/4a/5/5h ssh proxycommand\n\n[![Build](https://github.com/wzshiming/bridge/actions/workflows/go-cross-build.yml/badge.svg)](https://github.com/wzshiming/bridge/actions/workflows/go-cross-build.yml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/wzshiming/bridge)](https://goreportcard.com/report/github.com/wzshiming/bridge)\n[![GoDoc](https://godoc.org/github.com/wzshiming/bridge?status.svg)](https://godoc.org/github.com/wzshiming/bridge)\n[![Docker Automated build](https://img.shields.io/docker/cloud/automated/wzshiming/bridge.svg)](https://hub.docker.com/r/wzshiming/bridge)\n[![GitHub license](https://img.shields.io/github/license/wzshiming/bridge.svg)](https://github.com/wzshiming/bridge/blob/master/LICENSE)\n\n- [English](https://github.com/wzshiming/bridge/blob/master/README.md)\n- [简体中文](https://github.com/wzshiming/bridge/blob/master/README_cn.md)\n\n## Supported protocols\n\n- [Socks4](https://github.com/wzshiming/socks4)\n- [Socks5](https://github.com/wzshiming/socks5)\n- [HTTP Proxy](https://github.com/wzshiming/httpproxy)\n- [Shadow Socks](https://github.com/wzshiming/shadowsocks)\n- [SSH Proxy](https://github.com/wzshiming/sshproxy)\n- [Any Proxy](https://github.com/wzshiming/anyproxy)\n- [Emux](https://github.com/wzshiming/emux)\n\n## Example\n\nMapping example.org:80 TCP port to 8080 port of the local machines.  \n\n``` shell\nbridge -b :8080 -p example.org:80\n# `curl -H 'Host: example.org' 127.0.0.1:8080` will return to the target page\n```\n\nProxy that can go through various protocols.  \n\n``` shell\nbridge -b :8080 -p example.org:80 -p ssh://username:password@my_server:22\nbridge -b :8080 -p example.org:80 -p ssh://username@my_server:22?identity_file=~/.ssh/id_rsa\nbridge -b :8080 -p example.org:80 -p socks5://username:password@my_server:1080\nbridge -b :8080 -p example.org:80 -p http://username:password@my_server:8080\nbridge -b :8080 -p example.org:80 -p 'cmd:nc %h %p'\nbridge -b :8080 -p example.org:80 -p 'cmd:ssh sshserver nc %h %p'\n```\n\nIt can also go through multi-level proxy.  \n\n``` shell\nbridge -b :8080 -p example.org:80 -p http://username:password@my_server2:8080 -p http://username:password@my_server1:8080\n```\n\nUsing proxy protocol(http/socks4/socks5) instead of direct TCP forwarding.  \n\n``` shell\nbridge -b :8080 -p -\nbridge -b :8080 -p - -p http://username:password@my_server1:8080\n# `http_proxy=http://127.0.0.1:8080 curl example.org` Will be the proxy\n```\n\nYou can also use ssh to listen for port mapping from local port to server port,  \ndue to the limitation of sshd, only 127.0.0.1 ports can be monitored.  \nif you want to provide external services,  \nyou need to change the 'GatewayPorts no' in /etc/ssh/sshd_config to yes  \nand then reload sshd.  \n\n``` shell\nbridge -b :8080 -b ssh://username:password@my_server:22 -p 127.0.0.1:80\n```\n\nMore of the time I'm acting as a ssh proxy.  \n\n``` text\n# in ~/.ssh/config\nProxyCommand bridge -p %h:%p -p \"ssh://username@my_server?identity_file=~/.ssh/id_rsa\"\n```\n\n## Usage\n\n``` text\nUsage: bridge [-d] \\\n\t[-b=[[tcp://]bind_address]:bind_port \\\n\t[-b=ssh://bridge_bind_address:bridge_bind_port [-b=(socks4://|socks4a://|socks5://|socks5h://|https://|http://|ssh://|cmd:)bridge_bind_address:bridge_bind_port ...]]] \\ // \n\t-p=([tcp://]proxy_address:proxy_port|-) \\\n\t[-p=(socks4://|socks4a://|socks5://|socks5h://|https://|http://|ssh://|cmd:)bridge_proxy_address:bridge_proxy_port ...]\n  -b, --bind strings    The first is the listening address, and then the proxy through which the listening address passes.\n                        If it is not filled in, it is redirected to the pipeline.\n                        only SSH and local support listening, so the last proxy must be ssh.\n  -d, --debug           Output the communication data.\n  -p, --proxy strings   The first is the dial-up address, followed by the proxy through which the dial-up address passes.\n```\n\n## Installation\n\n``` shell\ngo install github.com/wzshiming/bridge/cmd/bridge@latest\n```\n\nor\n\n[Download releases](https://github.com/wzshiming/bridge/releases)\n\nor\n\n[Image](https://github.com/wzshiming/bridge/pkgs/container/bridge%2Fbridge)\n\n## License\n\nLicensed under the MIT License. See [LICENSE](https://github.com/wzshiming/bridge/blob/master/LICENSE) for the full license text.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwzshiming%2Fbridge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwzshiming%2Fbridge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwzshiming%2Fbridge/lists"}