Android connection not established

develop
question

#1

Hi,

I have taken the code of core and plugin module and added to my app.
I coded the part for connection using the the core module from my app. In that case the connection status goes directly to stopping and then stopped state.
I copied MyActivity and related files from sample app to my app and the connection is stuck in connecting state and then nothing happens.
I then also tried changing the package name of my app to match with that of sample app to make the remoteConfig work. But that did not help.
I tried replacing the default config in the sample app with the credentials of my Socks5 server and that worked. Which means the Socks5 server is working fine.

Expected behavior
Connection should go to connected state in my app using the core and plugin module.

Smartphone:

  • Android version: API 27, API 28
  • Device: Google Pixel XL, Android emulator
  • Version: commit 997eb799cfb83fc483bd99ad96c050a81fb5260b

Configuration
Put an x inside the [ ] that applies.

  • [x] IPv4 server address
  • [ ] IPv6 server address
  • [x] Client IPv4 availability
  • [ ] Client IPv6 availability
  • Encrypt method: aes-256-cfb
  • Route
    • [x] All
    • [ ] Bypass LAN
    • [ ] Bypass China
    • [ ] Bypass LAN & China
    • [ ] GFW List
    • [ ] China List
    • [ ] Custom rules
  • [ ] IPv6 route
  • [x] Apps VPN mode
  • [ ] Bypass mode
  • Remote DNS: 8.8.8.8
  • [ ] DNS Forwarding
  • Plugin configuration (if applicable):
  • [ ] Auto Connect
  • [ ] TCP Fast Open

Basically copying code for Socks5 connection to my app does not work for me to establish connection to my Socsk5 server.
Can you please let me know if this is bug and how to resolve this? If not then could you point me to any documentation, other than the GitHub readme, on how to integrate the library into an existing VPN app?


#2

The core library is only intended to be used by mobile and tv, not external usages. If you wish to re-purpose shadowsocks-android, it’s probably better if you start with the entire codebase.