第一步 下载适合自己系统的服务软件
下载地址:https://github.com/ilanyu/ReverseProxy/releases
第二步 运行服务
windows:
双击运行ReverseProxy_windows_amd64.exe
代理地址为:localhost:8888.如果需要共享服务,只需要将端口开放即可。官方教程:
./ReverseProxy_[OS]_[ARCH] -h
Usage of ReverseProxy_[OS]_[ARCH]:
-l string
listen on ip:port (default "0.0.0.0:8888")
-r string
reverse proxy addr (default "http://idea.lanyus.com:80")
./ReverseProxy_windows_amd64.exe -l "0.0.0.0:8081" -r "https://www.baidu.com"
Listening on 0.0.0.0:8081, forwarding to https://www.baidu.com
如果想修改端口:
./ReverseProxy_windows_amd64.exe -l "0.0.0.0:8081"
出现服务框,表示服务搭建完成。
LINUX:
同理下载ReverseProxy_linux_amd64,查看帮助命令:
[root@node01 soft]# ./ReverseProxy_linux_amd64 -h
Usage of ./ReverseProxy_linux_amd64:
-ip string
reverse proxy addr server ip
-l string
listen on ip:port (default "0.0.0.0:8888")
-r string
reverse proxy addr (default "http://idea.lanyus.com:80")
[root@node01 soft]#
执行./ReverseProxy_linux_amd64 -l "0.0.0.0:8000" 启动8000代理端口号。