6 Star 20 Fork 5

Jack.arain / wsproxy

Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
Clone or download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

一个支持websocket级联的socks5/http复合代理.

支持在同一个端口同时提供websocket、socks5、http代理服务, 支持通过websocket级联代理.

                 +-------------------+          |         +-------------------+
  browser/app -> | socks5/http proxy | -> wss --|-- wss ->|  sock/http proxy  |--> target
                 +-------------------+          |         +-------------------+
                     local server              Wall           remote server

或多级代理, 如:

                 +-------------------+     +-------------------+        +-------------------+
  browser/app -> | socks5/http proxy | --> | sock/http proxy   |------> | socks5/http proxy |--> target
                 +-------------------+ wss +-------------------+ socks  +-------------------+
                     local server               remote server              remote server

也可实现多线路负载均衡代理, 如:

                                                  +-------------------+
                                               +--|  sock/http proxy  |\
                                               |  +-------------------+
                                               |
                 +-------------------+         |  +-------------------+
  browser/app -> | socks5/http proxy | --> wss +->|  sock/http proxy  |-- target
                 +-------------------+         |  +-------------------+
                     local server              |
                                               |  +-------------------+
                                               +--|  sock/http proxy  |/
                                                  +-------------------+

                                                    remote servers

编译

安装golang/git环境后, 在项目目录执行以下命令编译

go build

即可完成编译,编译生成可执行程序, (注意, 上图中local server和remote server是同一个程序).

另外,remote server 可以配置多个以用于负载均衡,具体参考config.json.example文件.

说明

证书文件必须位于程序运行目录的 .wsproxy/certs 下, 统一通过ca.crt签名出server和client证书. 证书创建可以参考网上教程,如 https://openvpn.net/community-resources/setting-up-your-own-certificate-authority-ca/

remote server端用到 ca.crt server.crt server.key

local server端用到 ca.crt client.crt client.key

config.json 可参看 config.json.example 文件中的说明, 编写的config.json并放置于可执行程序同一目录.

相关讨论群 https://t.me/joinchat/C3WytT4RMvJ4lqxiJiIVhg

Comments ( 0 )

Sign in for post a comment

About

一个支持websocket级联的 socks5/http 复合代理. spread retract
Go
LGPL-2.1
Cancel

Releases

No release

wsproxy

Contributors

All

Activities

load more
can not load any more
Go
1
https://gitee.com/jackarain/wsproxy.git
git@gitee.com:jackarain/wsproxy.git
jackarain
wsproxy
wsproxy
master

Search

102255 3a0e046c 1850385 102255 7aaa926c 1850385