diff --git a/core/src/main/cpp/main.cpp b/core/src/main/cpp/main.cpp index 3a9b0e987..f99c7204e 100644 --- a/core/src/main/cpp/main.cpp +++ b/core/src/main/cpp/main.cpp @@ -41,6 +41,7 @@ Master::Master(JavaVM *vm, JNIEnv *env): vm(vm) { sDirect = g(env, env->NewStringUTF("Direct")); sReject = g(env, env->NewStringUTF("Reject")); sShadowsocks = g(env, env->NewStringUTF("Shadowsocks")); + sShadowsocksR = g(env, env->NewStringUTF("ShadowsocksR")); sSnell = g(env, env->NewStringUTF("Snell")); sSocks5 = g(env, env->NewStringUTF("Socks5")); sHttp = g(env, env->NewStringUTF("Http")); @@ -166,6 +167,9 @@ jobject Master::Context::createProxy(char const *name, proxy_type_t type, jlong case Shadowsocks: ts = master->sShadowsocks; break; + case ShadowsocksR: + ts = master->sShadowsocksR; + break; case Vmess: ts = master->sVmess; break; diff --git a/core/src/main/cpp/main.h b/core/src/main/cpp/main.h index 24d437604..83b303cfa 100644 --- a/core/src/main/cpp/main.h +++ b/core/src/main/cpp/main.h @@ -46,6 +46,7 @@ class Master { jstring sDirect; jstring sReject; jstring sShadowsocks; + jstring sShadowsocksR; jstring sSnell; jstring sSocks5; jstring sHttp; diff --git a/core/src/main/golang/proxies.go b/core/src/main/golang/proxies.go index a6f95bcfa..1a2173c4a 100644 --- a/core/src/main/golang/proxies.go +++ b/core/src/main/golang/proxies.go @@ -136,6 +136,8 @@ func typeToProxyTypeC(t constant.AdapterType) C.proxy_type_t { case constant.Shadowsocks: return C.Shadowsocks + case constant.ShadowsocksR: + return C.ShadowsocksR case constant.Snell: return C.Snell case constant.Socks5: diff --git a/core/src/main/golang/proxies.h b/core/src/main/golang/proxies.h index 53e41de9b..a8addd1c0 100644 --- a/core/src/main/golang/proxies.h +++ b/core/src/main/golang/proxies.h @@ -5,7 +5,7 @@ extern "C" { #endif typedef enum proxy_type_t { - Direct, Reject, Socks5, Http, Shadowsocks, Vmess, Snell, Trojan, Selector, Fallback, LoadBalance, URLTest, Relay, Unknown + Direct, Reject, Socks5, Http, Shadowsocks, ShadowsocksR, Vmess, Snell, Trojan, Selector, Fallback, LoadBalance, URLTest, Relay, Unknown } proxy_type_t; typedef struct proxy_t {