socks5proxy icon indicating copy to clipboard operation
socks5proxy copied to clipboard

Can I use client and server on the same computer?

Open One2Year opened this issue 5 years ago • 3 comments

For example, I run go run ../server/main.go -local :1235 -passwd 123 in a terminal. And run go run ../client/main.go -local 127.0.0.1:1234 -passwd 123 -server 127.0.0.1:1235 in another terminal window(in the same computer). That's to say, I want to use another port and my computer as a proxy. Will it work? When I do that, "server" showed 127.0.0.1:60868 请求协议错误 and "client" showed

00:29:14 success
panic: runtime error: index out of range

goroutine 5 [running]:
github.com/shikanon/socks5proxy.handleProxyRequest(0xc42000e040, 0xc420088570, 0x114be60, 0xc42004a3f0, 0x1133b87, 0x4)

One2Year avatar Mar 12 '20 07:03 One2Year

the cmd is Erorr, you can run server:

go run ../server/main.go -local :1235 -passwd 123

And run client:

go run ../client/main.go -local 127.0.0.1:5321 -passwd 123 -server 127.0.0.1:1235

the client local is local listening port.

shikanon avatar Mar 12 '20 09:03 shikanon

I have tried that and use SwitchyOmega in Chrome. image But the server showed 127.0.0.1:63394 协议错误, version版本不为5!

One2Year avatar Mar 12 '20 22:03 One2Year

If you use sock5 proxy tools, you can like this: the server run :

go run ./server/main.go -local :11235 -passwd 123

the client run add parameter recv:

go run ./client/main.go -local 127.0.0.1:5321 -passwd 123 -server 127.0.0.1:11235 -recv sock5

and set Switchy like this:

image

image

shikanon avatar Mar 13 '20 03:03 shikanon