git clone https://github.com/luckypoem/socks5-proxy socks5-proxy-by-yuanrenguang715
cd socks5-proxy-by-yuanrenguang715
cd server
go install
(server目录里有.go文件和go.sum, go.mod文件,于是可以运行go install来安装程序)
which server
$GOBIN/server
($GOBIN/里面就 出现了可执行文件server)
mv $GOBIN/server $GOBIN/server-based-on-socks5-proxy-by-yuanrenguang715
nano config.ini
然后,
cd socks5-proxy-by-yuanrenguang715
cd client
go install
(client目录里有.go文件和go.sum, go.mod文件,于是可以运行go install来安装程序)
which client
$GOBIN/client
($GOBIN/里面就 出现了可执行文件client)
mv $GOBIN/client $GOBIN/client-based-on-socks5-proxy-by-yuanrenguang715
nano config.ini
https://github.com/yuanrenguang715/socks5-proxy/issues/1
另外,我克隆了旧版:https://github.com/nopw/socks5-proxy为https://github.com/briteming/socks5-proxy,
然后修改了https://github.com/briteming/socks5-proxy/blob/master/client/client.go文件的第10,11行分别为:
"github.com/briteming/socks5-proxy/utils/config"
"github.com/briteming/socks5-proxy/utils/logger"
修改https://github.com/briteming/socks5-proxy/blob/master/utils/config/client.go文件的第4行为:
"github.com/briteming/socks5-proxy/utils/logger"
修改了https://github.com/briteming/socks5-proxy/blob/master/server/server.go文件的第12,13行分别为:
"github.com/briteming/socks5-proxy/utils/config"
"github.com/briteming/socks5-proxy/utils/logger"
修改了https://github.com/briteming/socks5-proxy/blob/master/utils/config/server.go文件的第4行为:
"github.com/briteming/socks5-proxy/utils/logger"
在本地机器mac上,安装go1.13环境。然后,
git clone https://github.com/briteming/socks5-proxy socks5-proxy-by-briteming
cd socks5-proxy-by-briteming
cd client
go build
(client目录里只有一个go文件:client.go,于是运行go build ,就会在当前目录下生成可执行文件client)
nano config.ini
cd socks5-proxy-by-briteming
cd server
运行go build会遇错:
on your linux vps,firstly install the go 1.13 environment.then,
cd $GOPATH
go get -u -v github.com/briteming/socks5-proxy/server/
which server
it shows:
/root/go/gopath/bin/server
this means the server-end is installed successfully.
mv $GOBIN/server $GOBIN/server-based-on-socks5-proxy-by-yuanrenguang715
mkdir -p /root/socks5-proxy-by-yuanrenguang715/server/
cd /root/socks5-proxy-by-yuanrenguang715/server/
wget https://github.com/briteming/socks5-proxy/raw/master/server/config.ini
nano config.ini
the config.ini contents is:
[server]
default_port = 23685
then,
nano /etc/systemd/system/socks5-proxy-by-yuanrenguang715.service
its contents is:
[Unit]
After=network.target [Service]
WorkingDirectory=/root/socks5-proxy-by-yuanrenguang715/server/
ExecStart=/root/go/gopath/bin/server-based-on-socks5-proxy-by-yuanrenguang715
Restart=always [Install]
WantedBy=multi-user.target
then,run:
systemctl start socks5-proxy-by-yuanrenguang715
systemctl enable socks5-proxy-by-yuanrenguang715
on local machine mac,firstly install go1.13。then,
git clone https://github.com/briteming/socks5-proxy socks5-proxy-by-briteming
cd socks5-proxy-by-briteming
cd client
go build (under the current dir, a executable file client will be generated.)
nano config.ini
its contents is:
[clinets]
server_ip = my-vps-public-ip
default_port = 2553
server_port = 23685
then run:./client
don’t close this terminal.
then, set chrome’s socks5 proxy server to be 127.0.0.1 ,port to be 2553 ,chrome just can cross the wall.
project url: https://github.com/briteming/socks5-proxy
No comments:
Post a Comment