orisson003

orisson003

Member Since 7 years ago

Experience Points
0
follower
Lessons Completed
0
follow
Best Reply Awards
1
repos

9 contributions in the last year

Pinned
⚡ For surge now
Activity
Nov
26
1 week ago
Activity icon
issue

orisson003 issue comment shadowsocks/shadowsocks-rust

orisson003
orisson003

Dual-stack listening is broken when obfuscation is enabled

In the configuration file, both properties of "server" and "obfs" are set as "::" and "obfs-server". After installing and enabling obfuscation plugin, shadowsocks-rust will only listen to the IPv6 interface without IPv4 as follows:

[email protected]:~#2021-11-26 09:50:43 UTC; 11s ago Docs: https://github.com/shadowsocks/shadowsocks-rust Main PID: 989 (ssserver) Tasks: 4 (limit: 833) Memory: 5.6M CGroup: /system.slice/shadowsocks-rust-server.service ├─ 989 /usr/local/bin/ssserver --log-without-time -c /etc/shadowsocks-rust/config.json └─1001 obfs-server

Nov 26 09:50:43 experimentvillage systemd[1]: Started Shadowsocks-rust Custom Server Service for . Nov 26 09:50:43 experimentvillage ssserver[989]: INFO shadowsocks server 1.12.2 build 2021-11-16T08:08:35.305971730+00:00 Nov 26 09:50:43 experimentvillage ssserver[989]: INFO shadowsocks tcp server listening on [::1]:37223, inbound address [::]:1025 Nov 26 09:50:43 experimentvillage ssserver[989]: INFO shadowsocks udp server listening on [::]:1025 Nov 26 09:50:43 experimentvillage ssserver[1001]: 2021-11-26 09:50:43 [simple-obfs] INFO: obfuscating enabled Nov 26 09:50:43 experimentvillage ssserver[1001]: 2021-11-26 09:50:43 [simple-obfs] INFO: tcp port reuse enabled Nov 26 09:50:43 experimentvillage ssserver[1001]: 2021-11-26 09:50:43 [simple-obfs] INFO: listening at [::]:1025 Nov 26 09:50:43 experimentvillage ssserver[1001]: 2021-11-26 09:50:43 [simple-obfs] INFO: running from root user

As you see, the IPv4 interface is not listened by the server client. However, the plug-in works well under the latest edge version of shadowsocks-libev with full dual stack support when simple-obfs is enabled. Notwithstanding I understand simple-obfs is deprecated by its original developer, it is still desired by many users given that its successor V2Ray has not been fully compatible with many mobile platforms. So far, only listening to IPv6 when simple-obfs is installed and enabled seems like a bug here.

orisson003
orisson003

I started with the config given above, and saw:

2021-11-26T21:34:48.730690323+08:00 INFO  shadowsocks server 1.12.2 build 2021-11-16T08:08:35.305971730+00:00
2021-11-26T21:34:48.731863447+08:00 INFO  shadowsocks tcp server listening on 127.0.0.1:39419, inbound address 0.0.0.0:1025
 2021-11-26 21:34:48 [simple-obfs] INFO: tcp port reuse enabled
 2021-11-26 21:34:48 [simple-obfs] INFO: listening at 0.0.0.0:1025
 2021-11-26 21:34:48 [simple-obfs] INFO: running from root user
2021-11-26T21:34:48.733914635+08:00 INFO  shadowsocks tcp server listening on [::1]:34283, inbound address [::]:1025
 2021-11-26 21:34:48 [simple-obfs] INFO: tcp port reuse enabled
 2021-11-26 21:34:48 [simple-obfs] INFO: listening at [::]:1025
 2021-11-26 21:34:48 [simple-obfs] INFO: running from root user

Check with netstat:

tcp        0      0 0.0.0.0:1025            0.0.0.0:*               LISTEN
tcp6       0      0 :::1025                 :::*                    LISTEN

Problem solved.

You can use any plugins you want, but here I will strictly follow SIP003 protocol.

Can confirm this works. Thanks.

Just an additional follow-up report that UDP relay/listening can't be enabled in this case otherwise the server will crash. Properties set as "mode": "TCP_and_UDP". Log shows follows:

Nov 26 14:49:50 experimentvillage ssserver[1988]: INFO shadowsocks udp server listening on 0.0.0.0:1025 Nov 26 14:49:50 experimentvillage ssserver[1998]: 2021-11-26 14:49:50 [simple-obfs] INFO: obfuscating enabled Nov 26 14:49:50 experimentvillage ssserver[1988]: INFO shadowsocks tcp server listening on [::1]:35051, inbound address [::]:1025 Nov 26 14:49:50 experimentvillage ssserver[1998]: 2021-11-26 14:49:50 [simple-obfs] INFO: tcp port reuse enabled Nov 26 14:49:50 experimentvillage ssserver[1988]: ERROR servers exited with error: Address already in use (os error 98) Nov 26 14:49:50 experimentvillage ssserver[1998]: 2021-11-26 14:49:50 [simple-obfs] INFO: listening at 0.0.0.0:1025 Nov 26 14:49:50 experimentvillage ssserver[1998]: 2021-11-26 14:49:50 [simple-obfs] INFO: running from root user Nov 26 14:49:50 experimentvillage ssserver[1988]: server aborted with server exited unexpectedly

Disabling this option and then it works well without UDP listening. Guess there might be a conflict of using the server address when trying to listen on UDP and TCP simultaneously. Better keep an eye on it if anyone would be interested in this usage scenario.

Activity icon
issue

orisson003 issue comment shadowsocks/shadowsocks-rust

orisson003
orisson003

Dual-stack listening is broken when obfuscation is enabled

In the configuration file, both properties of "server" and "obfs" are set as "::" and "obfs-server". After installing and enabling obfuscation plugin, shadowsocks-rust will only listen to the IPv6 interface without IPv4 as follows:

[email protected]:~#2021-11-26 09:50:43 UTC; 11s ago Docs: https://github.com/shadowsocks/shadowsocks-rust Main PID: 989 (ssserver) Tasks: 4 (limit: 833) Memory: 5.6M CGroup: /system.slice/shadowsocks-rust-server.service ├─ 989 /usr/local/bin/ssserver --log-without-time -c /etc/shadowsocks-rust/config.json └─1001 obfs-server

Nov 26 09:50:43 experimentvillage systemd[1]: Started Shadowsocks-rust Custom Server Service for . Nov 26 09:50:43 experimentvillage ssserver[989]: INFO shadowsocks server 1.12.2 build 2021-11-16T08:08:35.305971730+00:00 Nov 26 09:50:43 experimentvillage ssserver[989]: INFO shadowsocks tcp server listening on [::1]:37223, inbound address [::]:1025 Nov 26 09:50:43 experimentvillage ssserver[989]: INFO shadowsocks udp server listening on [::]:1025 Nov 26 09:50:43 experimentvillage ssserver[1001]: 2021-11-26 09:50:43 [simple-obfs] INFO: obfuscating enabled Nov 26 09:50:43 experimentvillage ssserver[1001]: 2021-11-26 09:50:43 [simple-obfs] INFO: tcp port reuse enabled Nov 26 09:50:43 experimentvillage ssserver[1001]: 2021-11-26 09:50:43 [simple-obfs] INFO: listening at [::]:1025 Nov 26 09:50:43 experimentvillage ssserver[1001]: 2021-11-26 09:50:43 [simple-obfs] INFO: running from root user

As you see, the IPv4 interface is not listened by the server client. However, the plug-in works well under the latest edge version of shadowsocks-libev with full dual stack support when simple-obfs is enabled. Notwithstanding I understand simple-obfs is deprecated by its original developer, it is still desired by many users given that its successor V2Ray has not been fully compatible with many mobile platforms. So far, only listening to IPv6 when simple-obfs is installed and enabled seems like a bug here.

orisson003
orisson003

It seems that this explains the problem as in simple-obfs

AI_PASSIVE was meant to * return a list of addresses to listen on, but it is impossible to listen on * 0.0.0.0 and :: at the same time, if :: implies dualstack mode. ( https://github.com/shadowsocks/simple-obfs/blob/486bebd9208539058e57e23a12f23103016e09b4/src/server.c#L222-L224)

Therefore to realise dual stack listening two sockets might be needed on both 0.0.0.0 and ::.

I kindly disagree with the point that supporting simple-obfs is useless. At very least, it offers a light-weight obfuscation without performance penalty and is still widely supported by different local clients applications compared with its successor V2Ray, whose support is not that universal. For users who choose to opt out obfuscation over TLS for any realistic reasons (detection or performance), simple-obfs is still, at least partially and not perfectly, meaningful.

Activity icon
issue

orisson003 issue comment shadowsocks/shadowsocks-rust

orisson003
orisson003

Dual-stack listening is broken when obfuscation is enabled

In the configuration file, both properties of "server" and "obfs" are set as "::" and "obfs-server". After installing and enabling obfuscation plugin, shadowsocks-rust will only listen to the IPv6 interface without IPv4 as follows:

[email protected]:~#2021-11-26 09:50:43 UTC; 11s ago Docs: https://github.com/shadowsocks/shadowsocks-rust Main PID: 989 (ssserver) Tasks: 4 (limit: 833) Memory: 5.6M CGroup: /system.slice/shadowsocks-rust-server.service ├─ 989 /usr/local/bin/ssserver --log-without-time -c /etc/shadowsocks-rust/config.json └─1001 obfs-server

Nov 26 09:50:43 experimentvillage systemd[1]: Started Shadowsocks-rust Custom Server Service for . Nov 26 09:50:43 experimentvillage ssserver[989]: INFO shadowsocks server 1.12.2 build 2021-11-16T08:08:35.305971730+00:00 Nov 26 09:50:43 experimentvillage ssserver[989]: INFO shadowsocks tcp server listening on [::1]:37223, inbound address [::]:1025 Nov 26 09:50:43 experimentvillage ssserver[989]: INFO shadowsocks udp server listening on [::]:1025 Nov 26 09:50:43 experimentvillage ssserver[1001]: 2021-11-26 09:50:43 [simple-obfs] INFO: obfuscating enabled Nov 26 09:50:43 experimentvillage ssserver[1001]: 2021-11-26 09:50:43 [simple-obfs] INFO: tcp port reuse enabled Nov 26 09:50:43 experimentvillage ssserver[1001]: 2021-11-26 09:50:43 [simple-obfs] INFO: listening at [::]:1025 Nov 26 09:50:43 experimentvillage ssserver[1001]: 2021-11-26 09:50:43 [simple-obfs] INFO: running from root user

As you see, the IPv4 interface is not listened by the server client. However, the plug-in works well under the latest edge version of shadowsocks-libev with full dual stack support when simple-obfs is enabled. Notwithstanding I understand simple-obfs is deprecated by its original developer, it is still desired by many users given that its successor V2Ray has not been fully compatible with many mobile platforms. So far, only listening to IPv6 when simple-obfs is installed and enabled seems like a bug here.

orisson003
orisson003

I think the reason is that simple-obfs explicitly set the IPV6_V6ONLY: https://github.com/shadowsocks/simple-obfs/blob/master/src/server.c#L245-L248

Many thanks for taking note on this part of the code! If I read it correctly, it seems that this function part works in the IPv6-only environment as the premise of the if condition. I do notice that simple-obfs reads the IPv6 address first. (https://github.com/shadowsocks/simple-obfs/blob/486bebd9208539058e57e23a12f23103016e09b4/src/server.c#L232). However it shall not break the dual stack support theoretically, as proven in the Shadowsocks-libev

Activity icon
issue

orisson003 issue comment shadowsocks/shadowsocks-rust

orisson003
orisson003

Dual-stack listening is broken when obfuscation is enabled

In the configuration file, both properties of "server" and "obfs" are set as "::" and "obfs-server". After installing and enabling obfuscation plugin, shadowsocks-rust will only listen to the IPv6 interface without IPv4 as follows:

[email protected]:~#2021-11-26 09:50:43 UTC; 11s ago Docs: https://github.com/shadowsocks/shadowsocks-rust Main PID: 989 (ssserver) Tasks: 4 (limit: 833) Memory: 5.6M CGroup: /system.slice/shadowsocks-rust-server.service ├─ 989 /usr/local/bin/ssserver --log-without-time -c /etc/shadowsocks-rust/config.json └─1001 obfs-server

Nov 26 09:50:43 experimentvillage systemd[1]: Started Shadowsocks-rust Custom Server Service for . Nov 26 09:50:43 experimentvillage ssserver[989]: INFO shadowsocks server 1.12.2 build 2021-11-16T08:08:35.305971730+00:00 Nov 26 09:50:43 experimentvillage ssserver[989]: INFO shadowsocks tcp server listening on [::1]:37223, inbound address [::]:1025 Nov 26 09:50:43 experimentvillage ssserver[989]: INFO shadowsocks udp server listening on [::]:1025 Nov 26 09:50:43 experimentvillage ssserver[1001]: 2021-11-26 09:50:43 [simple-obfs] INFO: obfuscating enabled Nov 26 09:50:43 experimentvillage ssserver[1001]: 2021-11-26 09:50:43 [simple-obfs] INFO: tcp port reuse enabled Nov 26 09:50:43 experimentvillage ssserver[1001]: 2021-11-26 09:50:43 [simple-obfs] INFO: listening at [::]:1025 Nov 26 09:50:43 experimentvillage ssserver[1001]: 2021-11-26 09:50:43 [simple-obfs] INFO: running from root user

As you see, the IPv4 interface is not listened by the server client. However, the plug-in works well under the latest edge version of shadowsocks-libev with full dual stack support when simple-obfs is enabled. Notwithstanding I understand simple-obfs is deprecated by its original developer, it is still desired by many users given that its successor V2Ray has not been fully compatible with many mobile platforms. So far, only listening to IPv6 when simple-obfs is installed and enabled seems like a bug here.

orisson003
orisson003

:: on common Linux distribution will enable dual-stack listening.

Nov 26 09:50:43 experimentvillage ssserver[1001]: 2021-11-26 09:50:43 [simple-obfs] INFO: listening at [::]:1025

Since simple-obfs have already listening on [::]:1025, it should also listening on 0.0.0.0:1025.

Theoretically yes I agree with that. However, I have conducted several experiments and uniformly they show only IPv6 interface is accessible. It means if the network environment lacks IPv6, there will no connection to the sever at all.

One mitigation I find is to force the server only listen to the IPv4 interface via "0.0.0.0" in the config file. But unfortunately in this case the dual stack is broken and IPv6 can't be used.

I then tried to designate IPv6 only listening via "::0" in the config file, it showed the same listening on [::]

Nov 26 12:41:22 experimentvillage ssserver[1982]: INFO shadowsocks tcp server listening on [::1]:34411, inbound address [::]:1> Nov 26 12:41:22 experimentvillage ssserver[1982]: INFO shadowsocks udp server listening on [::]:1025

In any case described above, dual stacks won't work at all even when "::" is showing. However, the same configuration and the same client profile are applied on Shadowsocks-libev 3.3.5 where dual stacks work fine. With the two screenshots shown: Screenshot 2021-11-26 at 20 35 46

Screenshot 2021-11-26 at 20 58 48
Activity icon
issue

orisson003 issue comment shadowsocks/shadowsocks-rust

orisson003
orisson003

Dual-stack listening is broken when obfuscation is enabled

In the configuration file, both properties of "server" and "obfs" are set as "::" and "obfs-server". After installing and enabling obfuscation plugin, shadowsocks-rust will only listen to the IPv6 interface without IPv4 as follows:

[email protected]:~#2021-11-26 09:50:43 UTC; 11s ago Docs: https://github.com/shadowsocks/shadowsocks-rust Main PID: 989 (ssserver) Tasks: 4 (limit: 833) Memory: 5.6M CGroup: /system.slice/shadowsocks-rust-server.service ├─ 989 /usr/local/bin/ssserver --log-without-time -c /etc/shadowsocks-rust/config.json └─1001 obfs-server

Nov 26 09:50:43 experimentvillage systemd[1]: Started Shadowsocks-rust Custom Server Service for . Nov 26 09:50:43 experimentvillage ssserver[989]: INFO shadowsocks server 1.12.2 build 2021-11-16T08:08:35.305971730+00:00 Nov 26 09:50:43 experimentvillage ssserver[989]: INFO shadowsocks tcp server listening on [::1]:37223, inbound address [::]:1025 Nov 26 09:50:43 experimentvillage ssserver[989]: INFO shadowsocks udp server listening on [::]:1025 Nov 26 09:50:43 experimentvillage ssserver[1001]: 2021-11-26 09:50:43 [simple-obfs] INFO: obfuscating enabled Nov 26 09:50:43 experimentvillage ssserver[1001]: 2021-11-26 09:50:43 [simple-obfs] INFO: tcp port reuse enabled Nov 26 09:50:43 experimentvillage ssserver[1001]: 2021-11-26 09:50:43 [simple-obfs] INFO: listening at [::]:1025 Nov 26 09:50:43 experimentvillage ssserver[1001]: 2021-11-26 09:50:43 [simple-obfs] INFO: running from root user

As you see, the IPv4 interface is not listened by the server client. However, the plug-in works well under the latest edge version of shadowsocks-libev with full dual stack support when simple-obfs is enabled. Notwithstanding I understand simple-obfs is deprecated by its original developer, it is still desired by many users given that its successor V2Ray has not been fully compatible with many mobile platforms. So far, only listening to IPv6 when simple-obfs is installed and enabled seems like a bug here.

orisson003
orisson003

The problem is likely not coming from simple-obfs as it shows that simple-obfs functions well under the latest Shadowsocks-libev:

● shadowsocks-libev.service - Shadowsocks-libev Default Server Service Loaded: loaded (/lib/systemd/system/shadowsocks-libev.service; enabled; vendor preset: enabled) Active: active (running) since Fri 2021-11-26 10:00:14 UTC; 11s ago Docs: man:shadowsocks-libev(8) Main PID: 1024 (ss-server) Tasks: 2 (limit: 833) Memory: 780.0K CGroup: /system.slice/shadowsocks-libev.service ├─1024 /usr/bin/ss-server -c /etc/shadowsocks-libev/config.json └─1035 obfs-server

Nov 26 10:00:14 experimentvillage ss-server[1024]: 2021-11-26 10:00:14 INFO: UDP relay enabled Nov 26 10:00:14 experimentvillage ss-server[1024]: 2021-11-26 10:00:14 INFO: initializing ciphers... aes-128-gcm Nov 26 10:00:14 experimentvillage ss-server[1024]: 2021-11-26 10:00:14 INFO: tcp server listening at 127.0.0.1:54351 Nov 26 10:00:14 experimentvillage ss-server[1035]: 2021-11-26 10:00:14 [simple-obfs] INFO: obfuscating enabled Nov 26 10:00:14 experimentvillage ss-server[1024]: 2021-11-26 10:00:14 INFO: udp server listening at [::0]:1025 Nov 26 10:00:14 experimentvillage ss-server[1024]: 2021-11-26 10:00:14 INFO: udp server listening at 0.0.0.0:1025 Nov 26 10:00:14 experimentvillage ss-server[1035]: 2021-11-26 10:00:14 [simple-obfs] INFO: tcp port reuse enabled Nov 26 10:00:14 experimentvillage ss-server[1035]: 2021-11-26 10:00:14 [simple-obfs] INFO: listening at 0.0.0.0:1025 Nov 26 10:00:14 experimentvillage ss-server[1035]: 2021-11-26 10:00:14 [simple-obfs] INFO: tcp port reuse enabled Nov 26 10:00:14 experimentvillage ss-server[1035]: 2021-11-26 10:00:14 [simple-obfs] INFO: listening at [::0]:1025

Activity icon
issue

orisson003 issue shadowsocks/shadowsocks-rust

orisson003
orisson003

Dual-stack listening is broken when obfuscation is enabled

In the configuration file, both properties of "server" and "obfs" are set as "::" and "obfs-server". After installing and enabling obfuscation plugin, shadowsocks-rust will only listen to the IPv6 interface without IPv4 as follows:

[email protected]:~#2021-11-26 09:50:43 UTC; 11s ago Docs: https://github.com/shadowsocks/shadowsocks-rust Main PID: 989 (ssserver) Tasks: 4 (limit: 833) Memory: 5.6M CGroup: /system.slice/shadowsocks-rust-server.service ├─ 989 /usr/local/bin/ssserver --log-without-time -c /etc/shadowsocks-rust/config.json └─1001 obfs-server

Nov 26 09:50:43 experimentvillage systemd[1]: Started Shadowsocks-rust Custom Server Service for . Nov 26 09:50:43 experimentvillage ssserver[989]: INFO shadowsocks server 1.12.2 build 2021-11-16T08:08:35.305971730+00:00 Nov 26 09:50:43 experimentvillage ssserver[989]: INFO shadowsocks tcp server listening on [::1]:37223, inbound address [::]:1025 Nov 26 09:50:43 experimentvillage ssserver[989]: INFO shadowsocks udp server listening on [::]:1025 Nov 26 09:50:43 experimentvillage ssserver[1001]: 2021-11-26 09:50:43 [simple-obfs] INFO: obfuscating enabled Nov 26 09:50:43 experimentvillage ssserver[1001]: 2021-11-26 09:50:43 [simple-obfs] INFO: tcp port reuse enabled Nov 26 09:50:43 experimentvillage ssserver[1001]: 2021-11-26 09:50:43 [simple-obfs] INFO: listening at [::]:1025 Nov 26 09:50:43 experimentvillage ssserver[1001]: 2021-11-26 09:50:43 [simple-obfs] INFO: running from root user

As you see, the IPv4 interface is not listened by the server client. However, the plug-in works well under the latest edge version of shadowsocks-libev with full dual stack support when simple-obfs is enabled. Notwithstanding I understand simple-obfs is deprecated by its original developer, it is still desired by many users given that its successor V2Ray has not been fully compatible with many mobile platforms. So far, only listening to IPv6 when simple-obfs is installed and enabled seems like a bug here.

Nov
25
1 week ago
Activity icon
issue

orisson003 issue comment shadowsocks/shadowsocks-rust

orisson003
orisson003

[Snap][Service]Service in snap can not work, because there is no default path of config file

there is no default path of config file, therefore i can not use snap start shadowsocks-rust.ssserver-daemon

debian 10, snap, shadowsocks-rust edge v1.11.2.r34.gf717984

orisson003
orisson003

Same problem here. It seems snap version can't automatically read configure file via a default or designated path as in Shadowsocks-libev. Neither can it pass parameters to its daemon service when invoking systemctl. Both of these methods are not currently working in the snap store version.

Activity icon
issue

orisson003 issue comment surge-networks/snell

orisson003
orisson003

请求snell支持udp转发,还是有许多场景需要用到udp的

orisson003
orisson003

确实需要,不然连clubhouse都没法用……

push

orisson003 push orisson003/Rules

orisson003
orisson003

Non-direct.list

Proxy as default

commit sha: 4b3a3c3bfb0eb3aae9e500f11efd67c3b10bfe2b

push time in 1 week ago
Activity icon
fork

orisson003 forked lhie1/Rules

orisson003 Updated
fork time in 1 week ago
Nov
24
1 week ago
Activity icon
issue

orisson003 issue surge-networks/snell

orisson003
orisson003

listen on IPv6 and IPv4 interfaces simultaneously

It’s good to see the new pre-release beta Snell now supports to listen on IPv6 interface. However, given most of the severs are not only IPv6 only but also dual-stack, it’s more practical to expect that Snell can listen on both interfaces for users to switch between IPv6 and v4.

Local clients can use a simple policy group FALLBACK with a IPv6 only website to realise the auto-IPv6-IPv4 switch if the network environment supports only one. E.g.:

v6test = fallback, v6, v4, url = https://ipv6.vm3.test-ipv6.com/ip/?callback=?, interval = 3600

Now the issues hands to Snell’s support on listening on both interfaces. Currently, the syntax in Snell configured file listen = ::0,port, 0.0.0.0, port only permits to listen to v4.