Coder Social home page Coder Social logo

riobard / go-shadowsocks2 Goto Github PK

View Code? Open in Web Editor NEW
716.0 716.0 1.6K 106 KB

Experimental Shadowsocks in Go. Stable fork at https://github.com/shadowsocks/go-shadowsocks2

License: Apache License 2.0

Go 95.86% Makefile 4.14%
golang proxy shadowsocks socks5

go-shadowsocks2's Introduction

Hi there 👋

go-shadowsocks2's People

Contributors

damoye avatar dreamacro avatar riobard avatar xqdoo00o avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

go-shadowsocks2's Issues

compilation fails

use this command : go get -u github.com/riobard/go-shadowsocks2 attention the github link
the error message : go/src/github.com/riobard/go-shadowsocks2/tcp_linux.go:36: c.SyscallConn undefined (type *net.TCPConn has no field or method SyscallConn)

func getOrigDst(conn net.Conn, ipv6 bool) (socks.Addr, error) {
c, ok := conn.(*net.TCPConn)
if !ok {
return nil, errors.New("only work with TCP connection")
}
rc, err := c.SyscallConn()
if err != nil {
return nil, err
}

but, use use this command : go get -u github.com/shadowsocks/go-shadowsocks2
Installation is successful.
https://github.com/shadowsocks/go-shadowsocks2/blob/90a5b4a50462fbbb14262f386251f056a8678a20/tcp_linux.go#L30-L39

I think the reason is go-version, can you compatible with the old version? like go 1.8

Whether the chrome browser should also set the proxy to 127.0.0.1:1080 for client mode

After opening the following command in windows 10, Unable to proxy, whether the chrome browser should also set the proxy to 127.0.0.1:1080

go-shadowsocks2 -c ss://AEAD_AES_256_GCM:[email protected]:4541 -socks :1080 -verbose -udptun :8053=8.8.8.8:53,:8054=8.8.4.4:53 -tcptun :8053=8.8.8.8:53,:8054=8.8.4.4:53 
2018/11/13 20:21:19 tcp.go:25: TCP tunnel :8053 <-> 110.55.172.205:4541 <-> 8.8.8.8:53
2018/11/13 20:21:19 tcp.go:25: TCP tunnel :8054 <-> 110.55.172.205:4541 <-> 8.8.4.4:53
2018/11/13 20:21:19 udp.go:51: UDP tunnel :8053 <-> 110.55.172.205:4541 <-> 8.8.8.8:53
2018/11/13 20:21:19 udp.go:51: UDP tunnel :8054 <-> 110.55.172.205:4541 <-> 8.8.4.4:53

测试UDP转发...未通过!

服务器是:go-shadowsocks2,客户端也是:go-shadowsocks2
qq 20181026145337

通过SSTap 测试,报下面错误:

[45:12] TCP测试开始.
[45:12] 正在测试TCP数据传递...
[45:12] 连接到SS节点...
[45:12] 已连接到SS节点.
[45:13] 测试TCP数据传递...通过!
[45:13] 延迟: 1 ms
[45:13] 测试完成!
[45:13] //////////////////////////////////////////////
[45:13] UDP测试开始.
[45:13] 正在测试UDP转发...
[45:13] 正在从代理服务器请求UDP转发...
[45:13] 服务器绑定在 127.0.0.1:1080.
[45:13] UDP隧道已建立
[45:13] 正在测试数据传送...
[45:27] 测试UDP转发...未通过!
[45:27] 测试完成!
[45:27] //////////////////////////////////////////////

客户端控制台打印如下错误:

444444444

Why do I see listening on udp6 eventhough it's disabled?

I've disabled IPv6 on my VPS by doing

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.eth0.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1"

I verified that eth0 is not using IPv6.
go-shadowsocks2 listens specifically on my ip address but this is what I see
capture
Any way to completely disable it?

run fail in android bash

arm:
GOARCH=arm GOOS=linux GOARM=7 $(GOBUILD) -o $(BINDIR)/$(NAME)-$@

2020/02/18 08:51:25 failed to connect to target: dial tcp: lookup i.stack.imgur.com on [::1]:53: read udp [::1]:34310->[::1]:53: read: connection refused
2020/02/18 08:51:26 failed to connect to target: dial tcp: lookup i.stack.imgur.com on [::1]:53: read udp [::1]:39516->[::1]:53: read: connection refused
2020/02/18 08:51:26 failed to connect to target: dial tcp: lookup www.google.com on [::1]:53: read udp [::1]:56988->[::1]:53: read: connection refused
2020/02/18 08:51:26 failed to connect to target: dial tcp: lookup i.stack.imgur.com on [::1]:53: read udp [::1]:33594->[::1]:53: read: connection refused
2020/02/18 08:51:26 failed to connect to target: dial tcp: lookup www.google.com on [::1]:53: read udp [::1]:46059->[::1]:53: read: connection refused
2020/02/18 08:51:26 failed to connect to target: dial tcp: lookup i.stack.imgur.com on [::1]:53: read udp [::1]:52322->[::1]:53: read: connection refused
2020/02/18 08:51:26 failed to connect to target: dial tcp: lookup i.stack.imgur.com on [::1]:53: read udp [::1]:52322->[::1]:53: read: connection refused
2020/02/18 08:51:26 failed to connect to target: dial tcp: lookup www.google.com on [::1]:53: read udp [::1]:35978->[::1]:53: read: connection refused
2020/02/18 08:51:27 failed to connect to target: dial tcp: lookup graph.facebook.com on [::1]:53: read udp [::1]:35463->[::1]:53: read: connection refused

===
in adb shell it can reslove the domain

1|root@Hi3798MV100:/data # ping www.google.com
PING www.google.com (172.217.163.228) 56(84) bytes of data.
64 bytes from hkg12s18-in-f4.1e100.net (172.217.163.228): icmp_seq=1 ttl=55 time=14.5 ms
64 bytes from hkg12s18-in-f4.1e100.net (172.217.163.228): icmp_seq=2 ttl=55 time=15.6 ms
64 bytes from hkg12s18-in-f4.1e100.net (172.217.163.228): icmp_seq=3 ttl=55 time=14.3 ms
^C
--- www.google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 14.357/14.849/15.660/0.594 ms
root@Hi3798MV100:/data #

Support config file?

Can we add profile support?

Using the Cobra library to load configuration files and process command line arguments seems more friendly; if possible, I will commit a PR.

不需要obfs吗?

我下载了64位的,已经成功连接了我的ss-server,有一个疑问,我的server设置了plugin-obfs,我使用以下命令:
go-shadowsocks2 -c ss://CHACHA20_IETF:password@[server_address]:8488 -verbose -socks :1080
这样配合Proxy-SwitchyOmega就成功了,为什么不需要plugin呢?

Error from my ss service, how to solve it

Open youtube, the following error occurs in the gap:

2018/11/14 02:19:16 tcp.go:116: failed to get target address: cipher: message authentication failed
2018/11/14 02:19:16 tcp.go:116: failed to get target address: cipher: message authentication failed
2018/11/14 04:28:50 tcp.go:116: failed to get target address: cipher: message authentication failed
2018/11/14 04:46:52 tcp.go:116: failed to get target address: cipher: message authentication failed
2018/11/14 06:46:12 tcp.go:116: failed to get target address: cipher: message authentication failed
2018/11/14 06:46:13 tcp.go:116: failed to get target address: cipher: message authentication failed
2018/11/14 06:46:13 tcp.go:116: failed to get target address: cipher: message authentication failed
2018/11/14 10:54:29 tcp.go:116: failed to get target address: cipher: message authentication failed


After using it for one day, the error occurred is as follows:

2018/11/14 00:50:17 tcp.go:116: failed to get target address: cipher: message authentication failed
2018/11/14 01:56:39 tcp.go:122: failed to connect to target: dial tcp 43.224.184.234:443: connect: connection timed out
2018/11/14 01:56:39 tcp.go:122: failed to connect to target: dial tcp 43.224.184.234:443: connect: connection timed out
2018/11/14 01:56:39 tcp.go:122: failed to connect to target: dial tcp 43.224.184.234:443: connect: connection timed out
2018/11/14 01:56:39 tcp.go:122: failed to connect to target: dial tcp 43.224.184.234:443: connect: connection timed out
2018/11/14 01:56:39 tcp.go:122: failed to connect to target: dial tcp 43.224.184.234:443: connect: connection timed out
2018/11/14 01:56:47 tcp.go:122: failed to connect to target: dial tcp 43.224.184.234:443: connect: connection timed out
2018/11/14 01:56:47 tcp.go:122: failed to connect to target: dial tcp 43.224.184.234:443: connect: connection timed out
2018/11/14 01:56:47 tcp.go:122: failed to connect to target: dial tcp 43.224.184.234:443: connect: connection timed out
2018/11/14 01:56:47 tcp.go:122: failed to connect to target: dial tcp 43.224.184.234:443: connect: connection timed out
2018/11/14 01:56:47 tcp.go:122: failed to connect to target: dial tcp 43.224.184.234:443: connect: connection timed out
2018/11/14 02:19:12 tcp.go:116: failed to get target address: EOF
2018/11/14 02:19:16 tcp.go:116: failed to get target address: cipher: message authentication failed
2018/11/14 02:19:16 tcp.go:116: failed to get target address: cipher: message authentication failed
2018/11/14 02:26:07 tcp.go:134: relay error: read tcp 182.32.12.245:51884->104.237.191.1:443: read: connection reset by peer
2018/11/14 04:28:50 tcp.go:116: failed to get target address: cipher: message authentication failed
2018/11/14 04:46:52 tcp.go:116: failed to get target address: cipher: message authentication failed
2018/11/14 06:42:21 tcp.go:116: failed to get target address: read tcp 182.32.12.245:51884:51884:44051->218.68.218.136:52050: read: connection timed out
2018/11/14 06:46:12 tcp.go:116: failed to get target address: cipher: message authentication failed
2018/11/14 06:46:13 tcp.go:116: failed to get target address: cipher: message authentication failed
2018/11/14 06:46:13 tcp.go:116: failed to get target address: cipher: message authentication failed

multi user feature request

Hi there,
Will this project support multi user mode in the future? I would like to make a server to serve a lot of user. Each user will have their own password and port. Will you guys consider adding this feature?

Bests

Too many goroutines created for relay udp

func (m *natmap) Add(peer net.Addr, dst, src net.PacketConn, srcIncluded bool) {
m.Set(peer.String(), src)

go func() {
timedCopy(dst, peer, src, m.timeout, srcIncluded)
if pc := m.Del(peer.String()); pc != nil {
pc.Close()
}
}()
}

Every udp packet need a goroutine.

TCP fast open support

TCP fast open will help to use ss-protocol on Linux or OSX.

So I think should enable tcp fast open with parameters to accelerate network speed

Error: "too many colons in address" in windows 10

First of all, thanks for your work. I try this in Linux. It works in both client and server. But when I try to run the client in windows10. It says "too many colons in address". The command is as follows:

shadowsocks2-win64.exe -c 'ss://AEAD_CHACHA20_POLY1305:[email protected]:8488' -verbose -socks :1080 -u -udptun :8053=8.8.8.8:53,:8054=8.8.4.4:53 -tcptun :8053=8.8.8.8:53,:8054=8.8.4.4:53
2018/09/02 09:30:07 udp.go:81: UDP server address error: address 'ss://AEAD_CHACHA20_POLY1305:[email protected]:8488': too many colons in address
2018/09/02 09:30:07 udp.go:27: UDP server address error: address 'ss://AEAD_CHACHA20_POLY1305:[email protected]:8488': too many colons in address
2018/09/02 09:30:07 tcp.go:24: TCP tunnel :8054 <-> 'ss://AEAD_CHACHA20_POLY1305:[email protected]:8488' <-> 8.8.4.4:53
2018/09/02 09:30:07 tcp.go:13: SOCKS proxy :1080 <-> 'ss://AEAD_CHACHA20_POLY1305:[email protected]:8488'
2018/09/02 09:30:07 udp.go:27: UDP server address error: address 'ss://AEAD_CHACHA20_POLY1305:[email protected]:8488': too many colons in address
2018/09/02 09:30:07 tcp.go:24: TCP tunnel :8053 <-> 'ss://AEAD_CHACHA20_POLY1305:[email protected]:8488' <-> 8.8.8.8:53

If I change ss://AEAD_CHACHA20_POLY1305:[email protected]:8488 to ss://AEAD_CHACHA20_POLY1305, there is no above error. So, I suppose there are some escape issues. But I am not familar with the escape characters in windows10. I am confusing after I read the the following link. And there is similar issue in docker in 2016. It still opens.

Thanks.

General UDP tunnel?

Hi,
Does this project support general UDP tunnel on socks proxy protocol(not for DNS at port 53)?
For example, my video chat app will send and receive UDP packets, and I set up the socks proxy for the app.
So the UDP path is: User APP --> local socks proxy --> shadowsocks encryption tunnel --> remote socks proxy server --> APP server.
The reverse direction is also needed.
Will this case work in go-shadowsocks2? and how to set up? I didn't find it in README.md
Thank you for your time.

重写cow

https://github.com/cyfdecyf/cow 是一个提供http协议,并且能自动进行分流的客户端。由于目前shadowsocks-go作者并没有继续进行维护,而cow的shadowsocks协议部分是基于shadowsocks-go。所以,作者有没有重写cow客户端的意愿。

我大致调研了一下,https://github.com/golang/net/blob/master/proxy/per_host.go 提供了代理分流的一些简单的范例,我对网络编程不是非常熟悉,不知道作者有没有想法协助一下。

我的设想是大概在前端提供http代理,根据配置文件中的规则进行分流,后端使用go-shadowsocks2。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.