shadowsocks-android icon indicating copy to clipboard operation
shadowsocks-android copied to clipboard

Failed to import ss:// (ssurl bug or Android app bug?)

Open brianwoo opened this issue 2 years ago • 1 comments

Please read contributing guidelines. Thanks.

Describe the bug Unable to import ss:// into the Android App. I am unsure if this is a ssurl bug or the Android app.

To Reproduce Steps to reproduce the behavior:

  1. Generate a password with ssservice genkey
/opt/shadowsocks/ssservice genkey --encrypt-method "2022-blake3-chacha20-poly1305"
F6BY4IwbXB5Juobo2aofoJ6P86G/yBYJO3pJzcMIUOU=
  1. Create a json file with all the configuration
cat ~/Downloads/client.json 
{
  "server": "1.2.3.4",
  "server_port": 8400,
  "password": "F6BY4IwbXB5Juobo2aofoJ6P86G/yBYJO3pJzcMIUOU=",
  "method": "2022-blake3-chacha20-poly1305"
}
  1. Encode the json to an ss:// string
/opt/shadowsocks/ssurl --encode ~/Downloads/client.json
ss://2022-blake3-chacha20-poly1305:F6BY4IwbXB5Juobo2aofoJ6P86G%2FyBYJO3pJzcMIUOU%[email protected]:8400
  1. If I import this ss:// string into the Android app, I get an error "Failed to import."

  2. If I decode the ss:// string (notice the password has a backslash for escaping the forward slash):

/opt/shadowsocks/ssurl --decode ss://2022-blake3-chacha20-poly1305:F6BY4IwbXB5Juobo2aofoJ6P86G%2FyBYJO3pJzcMIUOU%[email protected]:8400
{"server":"1.2.3.4","server_port":8400,"password":"F6BY4IwbXB5Juobo2aofoJ6P86G\/yBYJO3pJzcMIUOU=","method":"2022-blake3-chacha20-poly1305","mode":"tcp_and_udp"}

Expected behavior ss:// string should be imported, even with an escape char in the json

Smartphone (please complete the following information):

  • Android/Chrome OS version: "Android 14"
  • Device: Google Pixel 6
  • Version: version code "v5.3.3"

Configuration Put an x inside the [ ] that applies.

  • [x] IPv4 server address
  • [ ] IPv6 server address
  • [x] Client IPv4 availability
  • [ ] Client IPv6 availability
  • Encrypt method:
  • Route
    • [x] All
    • [ ] Bypass LAN
    • [ ] Bypass China
    • [ ] Bypass LAN & China
    • [ ] GFW List
    • [ ] China List
    • [ ] Custom rules
  • [ ] IPv6 route
  • [ ] Apps VPN mode
    • [ ] Bypass mode
  • Remote DNS: 8.8.8.8
  • [ ] DNS over UDP
  • Plugin configuration (if applicable):
  • [ ] Auto Connect
  • [ ] TCP Fast Open
  • If you're not using VPN mode, please supply more details here:

brianwoo avatar Nov 14 '23 15:11 brianwoo

I faced the same problem with others AEAD 2022 encryption methods. Without it, it is impossible to use the feature "one port -multiple users".

DmitryPogrebnoy avatar Feb 11 '24 12:02 DmitryPogrebnoy