shadowsocks / shadowsocks-android

A shadowsocks client for Android
Other
35.06k stars 11.58k forks source link

Seems [proxy_all] and [bypass_list} not working in custom ruls #2895

Closed iamsad3508 closed 2 years ago

iamsad3508 commented 2 years ago

Discussed in https://github.com/shadowsocks/shadowsocks-android/discussions/2894

Originally posted by **iamsad3508** May 31, 2022 I want to bypass only 192.168.*.* with route set as ALL, but i know zero about rules, can anyone help?

Please read contributing guidelines. Thanks.

Describe the bug Seems [proxy_all] and [bypass_list} not working in custom ruls

To Reproduce Steps to reproduce the behavior: SCENES 1

  1. create an ACL file, fill it with [proxy_all] [bypass_list] 192.168.0.0/16
  2. creat a url like https://abc.xyz/abc.acl
  3. adding the url in custom rule-URL to onlifne config
  4. change profile route to custom rules

SCENES 2

  1. copy [proxy_all] [bypass_list] 192.168.0.0/16
  2. open custom rules ,import from clipboard, FAIL TO IMPORT Nothing show in the list and pop out a message : Fail to import Seems including any of these(proxy_all and bypass_all) will fail to import

Expected behavior SCENES 1 :all traffic including 127.0.0.1 go through SS, except 192.168.1.1 SCENES 2 :Import success

Screenshots If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

Configuration Put an x inside the [ ] that applies.

Additional context Add any other context about the problem here.

yeganemehr commented 2 years ago

same here! I want to bypass some subnets, and proxy all others but it's not working

Mygod commented 2 years ago

Not supported.

yeganemehr commented 2 years ago

Such a shame! We are living in a time that our governments take any action, pursuit any clue to shoot our access to free internet, to censor data flow. You @Mygod and other contributors done wonderful job in this repo. Thank you! But it's no need to this manner. This issue is not big technical deal, All of code that do the job is there and it's important to people that using it.

You may heard in the news, In my country (Iran) now internet is shutdown and only domestic network is working. Only essential services (like banks, online taxis, government services, etc) are working. If you somehow could get access to global internet (with ssh tunneling through multiple hosts) you cannot access to those essential services; This isn't new, before these events all of important services in Iran just work in domestic network (Intranet) so we have to just keep switching VPNs on and off several times in a day (like 10-20 times in a day).

Do not forget why this projects exist, what was their philosophy. You can solve this issue or at least keep it open to someday someone solve it.


For those like me that can't wait: you can do this

  1. First donwload apk of shadowsocks

    cd /tmp
    wget -O shadowsocks.apk https://github.com/shadowsocks/shadowsocks-android/releases/download/v5.2.6/shadowsocks--universal-v5.2.6.apk
  2. Unpack apk of shadowsocks using APKTool

    apktool d -s shadowsocks.apk
  3. Edit shadowsocks/assets/acl/gfwlist.acl to your desire.

  4. Change value of route_entry_gfwlist in shadowsocks/res/values/strings.xml Screenshot_2022-09-25_15-19-42

  5. Repack apk

    apk b shadowsocks
  6. Generate a keystore:

    keytool -genkey -keystore debug.keystore -validity 10000 -alias debug -keyalg rsa
  7. Sign apk with your self-sign-certificate:

    jarsigner -keystore debug.keystore -verbose shadowsocks/dist/shadowsocks.apk debug
  8. Install it on your device:

    adb install -r shadowsocks/dist/shadowsocks.apk
  9. In your VPN profile, choose new option. photo_2022-09-25_15-22-18