Giter Site home page Giter Site logo

ssrdroid's People

Contributors

anyofyou avatar ayanamist avatar chon219 avatar clowwindy avatar czbix avatar ewrfdv avatar fossabot avatar haobug avatar imreker avatar jllk avatar jlund avatar kaneawk avatar madeye avatar mygod avatar nmyggg avatar pexcn avatar prihlop avatar shadowsocksrb avatar ssrlive avatar sunsysjp avatar tacothedank avatar v-e-o avatar vmlinz avatar winer632 avatar wongsyrone avatar wyzegob avatar xmh19936688 avatar yyxida avatar zhaofengli avatar zhongl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ssrdroid's Issues

新手小白请教

请教5.2.0新增的rust语言部分
代码5.2.0版本克隆下来后,这部分需要执行什么操作吗,这部分代码看不太懂,小白一枚,谢谢大佬指教

調試 Android 軟件

  1. 修改 build.gradle(Module: ssrDroid.app) 文件,添加如下這些調試相關選項。
android {
    buildTypes {
        debug {
            debuggable true
            jniDebuggable true
            renderscriptDebuggable true
        }
    }
}
  1. 點那個調試(昆蟲)圖標在真機或模擬器内運行程序。然後再點 Attach Debugger to Android Process 圖標,在彈出的對話框内將所有關聯進程都挂上調試器,否則將可能不能命中你設下的斷點。

image

參考文章

如何调试Android Native Framework 或者 這裏

如何调试Android Framework?

经常发生后台服务启动失败

配置正常,启动时或者正在使用时(一小段时间内可访问外网,出错后断网了),经常发生错误:

后台服务启动失败:libtun2socks exits too fast (exit code: 134)

出错后,上方状态的vpn小锁自动消失。然后,无法访问外网。重新启动后,用一小会又出现上面的错误

ssrDroid版本:Version 5.1.7
ssrdroid-debug.apk 出错时会有上面提示信息
ssrdroid-release.apk 无法启动,上方状态栏无vpn小锁

系统:
设备名称: nova 7 se 5G
型号: CDY-AN00
版本: 2.0.0.233
HarmonyOS版本: 2.0.0
处理器: Huawei kirin 820
运行内存: 8.0G
存储:128G

手机上安装的红色版本的ssr能正常使用,开了后vpn小钥匙稳定在上方状态栏。

麻烦 @ssrlive 大佬帮忙看看! 谢谢!

unexpected tunnel terminated

我是小米手机,ssrDroid连不上服务端,看到服务端报错:

ssr-server 2023/03/31 19:38  info  tunnel_stage_initial
ssr-server 2023/03/31 19:38 error  unexpect tunnel terminated. about _client_ "(null)": Unknown system error 833 - tunnel_stage_initial
ssr-server 2023/03/31 19:38  info  ==== tunnel destroyed   count   6 ====
ssr-server 2023/03/31 19:38  info  ==== tunnel created     count   7 ====
ssr-server 2023/03/31 19:38  info  tunnel_stage_initial
ssr-server 2023/03/31 19:38 error  unexpect tunnel terminated. about _client_ "(null)": Unknown system error 612 - tunnel_stage_initial
ssr-server 2023/03/31 19:38  info  ==== tunnel destroyed   count   6 ====
ssr-server 2023/03/31 19:38  info  ==== tunnel created     count   7 ====
ssr-server 2023/03/31 19:38  info  tunnel_stage_initial
ssr-server 2023/03/31 19:38 error  unexpect tunnel terminated. about _client_ "(null)": Unknown system error 349 - tunnel_stage_initial
ssr-server 2023/03/31 19:38  info  ==== tunnel destroyed   count   6 ====
ssr-server 2023/03/31 19:38  info  ==== tunnel created     count   7 ====
ssr-server 2023/03/31 19:38  info  tunnel_stage_initial
ssr-server 2023/03/31 19:38 error  unexpect tunnel terminated. about _client_ "(null)": Unknown system error 544 - tunnel_stage_initial

我用mac客户端,同样配置连接没有问题,想问下是andriod客户端有问题吗?

断开后再次连接无法联网

系統版本:安卓12
軟件版本:5.3.3 ,5.3.2
使用的是overtls 服務器 Tun2proxy是开启的,首次连接正常,断开后再次连接使用时无法联网,需要等待几分钟后才可以正常使用。但在安卓9的设备上一切都是正常的。经过多次尝试后发现和私人DNS模式有关,当私人DNS模式处于非关闭的状态时就有出现这种情况。但SS不受影响。

1.mp4

DNS over TCP proxy?

App currently works, but DNS still gets poisoned. I used to use socksdroid and connect to local pc client. On pc I have a ssrot client, and a TCP dns server which again proxies to the ssrot client. This way dns is also proxied through ssrot and problem solved. It would be great if this feature is included in app itself.

ssrDroid版本:Version 5.2.0,rust问题请教

cargo build
Compiling libc v0.2.144
Compiling cfg-if v1.0.0
Compiling autocfg v1.1.0
Compiling proc-macro2 v1.0.58
Compiling unicode-ident v1.0.8
Compiling quote v1.0.27
Compiling log v0.4.17
Compiling scopeguard v1.1.0
Compiling version_check v0.9.4
Compiling cc v1.0.79
Compiling memchr v2.5.0
Compiling once_cell v1.17.1
Compiling untrusted v0.7.1
Compiling spin v0.5.2
Compiling bytes v1.4.0
Compiling parking_lot_core v0.9.7
Compiling bitflags v1.3.2
Compiling pin-project-lite v0.2.9
Compiling smallvec v1.10.0
Compiling pin-utils v0.1.0
Compiling io-lifetimes v1.0.10
Compiling futures-core v0.3.28
Compiling itoa v1.0.6
Compiling typenum v1.16.0
Compiling rustix v0.37.19
Compiling tinyvec_macros v0.1.1
Compiling percent-encoding v2.2.0
Compiling tinyvec v1.6.0
Compiling generic-array v0.14.7
Compiling lock_api v0.4.9
Compiling tokio v1.28.1
Compiling slab v0.4.8
Compiling byteorder v1.4.3
Compiling futures-sink v0.3.28
Compiling futures-task v0.3.28
Compiling futures-channel v0.3.28
Compiling fnv v1.0.7
Compiling http v0.2.9
Compiling unicode-normalization v0.1.22
Compiling ring v0.16.20
Compiling form_urlencoded v1.1.0
Compiling futures-util v0.3.28
Compiling semver v1.0.17
Compiling rustls v0.21.1
Compiling unicode-bidi v0.3.13
Compiling httparse v1.8.0
Compiling idna v0.3.0
Compiling syn v2.0.16
Compiling mio v0.8.6
Compiling signal-hook-registry v1.4.1
Compiling num_cpus v1.15.0
Compiling socket2 v0.4.9
Compiling errno v0.3.1
Compiling parking_lot v0.12.1
Compiling indexmap v1.9.3
Compiling tracing-core v0.1.31
Compiling utf8parse v0.2.1
Compiling thiserror v1.0.40
Compiling futures-io v0.3.28
Compiling anstyle-parse v0.2.0
Compiling getrandom v0.2.9
Compiling tracing v0.1.37
Compiling is-terminal v0.4.7
Compiling url v2.3.1
Compiling memoffset v0.7.1
Compiling anstyle-query v1.0.0
Compiling colorchoice v1.0.0
Compiling hashbrown v0.12.3
Compiling serde v1.0.163
Compiling anstyle v1.0.0
Compiling anstream v0.3.2
Compiling rand_core v0.6.4
Compiling aho-corasick v1.0.1
Compiling ahash v0.8.3
Compiling regex-syntax v0.7.1
Compiling strsim v0.10.0
Compiling clap_lex v0.5.0
Compiling heck v0.4.1
Compiling try-lock v0.2.4
Compiling ppv-lite86 v0.2.17
Compiling base64 v0.21.1
Compiling want v0.3.0
Compiling clap_builder v4.3.0
Compiling rand_chacha v0.3.1
Compiling block-buffer v0.10.4
Compiling crypto-common v0.1.6
Compiling digest v0.10.7
Compiling http-body v0.4.5
Compiling httpdate v1.0.2
Compiling ryu v1.0.13
Compiling cpufeatures v0.2.7
Compiling regex v1.8.1
Compiling rustc_version v0.4.0
Compiling serde_json v1.0.96
Compiling async-trait v0.1.68
Compiling humantime v2.1.0
Compiling tower-service v0.3.2
Compiling static_assertions v1.1.0
Compiling termcolor v1.2.0
Compiling heapless v0.7.16
Compiling sha1 v0.10.5
Compiling rand v0.8.5
Compiling spin v0.9.8
Compiling nix v0.26.2
Compiling env_logger v0.10.0
Compiling hash32 v0.2.1
Compiling smoltcp v0.9.1 (https://github.com/smoltcp-rs/smoltcp#8b0c521e)
Compiling stable_deref_trait v1.2.0
Compiling dotenvy v0.15.7
Compiling utf-8 v0.7.6
Compiling data-encoding v2.4.0
Compiling hashbrown v0.13.2
Compiling rustls-pemfile v1.0.2
Compiling encoding_rs v0.8.32
Compiling mime v0.3.17
Compiling ipnet v2.7.2
Compiling rustls-webpki v0.100.1
Compiling sct v0.7.0
Compiling webpki v0.22.0
Compiling managed v0.8.0
Compiling hashlink v0.8.2
Compiling tokio-macros v2.1.0
Compiling thiserror-impl v1.0.40
Compiling serde_derive v1.0.163
Compiling clap_derive v4.3.0
Compiling webpki-roots v0.23.0
Compiling webpki-roots v0.22.6
Compiling daemonize v0.5.0
Compiling fork v0.1.21
Compiling lazy_static v1.4.0
Compiling ctrlc v3.3.0
Compiling prctl v1.0.0
Compiling clap v4.3.0
Compiling tungstenite v0.19.0
Compiling tun2proxy v0.1.1 (/Users/yangdehui/Desktop/ssrDroid/rust/tun2proxy)
error[E0432]: unresolved import smoltcp::phy::TunTapInterface
--> tun2proxy/src/tun2proxy.rs:10:45
|
10 | use smoltcp::phy::{Device, Medium, RxToken, TunTapInterface, TxToken};
| ^^^^^^^^^^^^^^^ no TunTapInterface in phy

warning: unused import: std::os::unix::io::AsRawFd
--> tun2proxy/src/tun2proxy.rs:20:5
|
20 | use std::os::unix::io::AsRawFd;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: #[warn(unused_imports)] on by default

warning: unused import: Device
--> tun2proxy/src/tun2proxy.rs:10:20
|
10 | use smoltcp::phy::{Device, Medium, RxToken, TunTapInterface, TxToken};
| ^^^^^^

warning: unused import: RxToken
--> tun2proxy/src/tun2proxy.rs:10:36
|
10 | use smoltcp::phy::{Device, Medium, RxToken, TunTapInterface, TxToken};
| ^^^^^^^

warning: unused import: TxToken
--> tun2proxy/src/tun2proxy.rs:10:62
|
10 | use smoltcp::phy::{Device, Medium, RxToken, TunTapInterface, TxToken};
| ^^^^^^^

For more information about this error, try rustc --explain E0432.
warning: tun2proxy (lib) generated 4 warnings
error: could not compile tun2proxy due to previous error; 4 warnings emitted

連線失敗

vpn連接時報錯
Crashlytics logException: java.io.IOException: Cannot run program "/data/app/~~pzhY_0ctI9dJUhhbLuS1uQ==/com.a.a-tNK7KoqdWmrooabBD5vlCw==/lib/arm64/libtun2socks.so" (in directory "/data/user_de/0/com.a.a/no_backup"): error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:1050) at com.github.shadowsocks.bg.GuardedProcessPool$Guard.start(GuardedProcessPool.kt:66) at com.github.shadowsocks.bg.GuardedProcessPool.start(GuardedProcessPool.kt:138) at com.github.shadowsocks.bg.SsrVpnService.startVpn(SsrVpnService.kt:205) at com.github.shadowsocks.bg.SsrVpnService.startProcesses(SsrVpnService.kt:123) at com.github.shadowsocks.bg.SsrVpnService$startProcesses$1.invokeSuspend(Unknown Source:15) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at android.os.Handler.handleCallback(Handler.java:942) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:240) at android.os.Looper.loop(Looper.java:351) at android.app.ActivityThread.main(ActivityThread.java:8423) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:584) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1013) Caused by: java.io.IOException: error=2, No such file or directory at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.<init>(UNIXProcess.java:133) at java.lang.ProcessImpl.start(ProcessImpl.java:141) at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) at com.github.shadowsocks.bg.GuardedProcessPool$Guard.start(GuardedProcessPool.kt:66)  at com.github.shadowsocks.bg.GuardedProcessPool.start(GuardedProcessPool.kt:138)  at com.github.shadowsocks.bg.SsrVpnService.startVpn(SsrVpnService.kt:205)  at com.github.shadowsocks.bg.SsrVpnService.startProcesses(SsrVpnService.kt:123)  at com.github.shadowsocks.bg.SsrVpnService$startProcesses$1.invokeSuspend(Unknown Source:15)  at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)  at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)  at android.os.Handler.handleCallback(Handler.java:942)  at android.os.Handler.dispatchMessage(Handler.java:99)  at android.os.Looper.loopOnce(Looper.java:240)  at android.os.Looper.loop(Looper.java:351)  at android.app.ActivityThread.main(ActivityThread.java:8423)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:584)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1013) 
是因為我哪塊沒配置對嗎,大佬給看一下

作者你好,客戶端編譯報錯,請問怎麼解決

C/C++: ninja: Entering directory `/Users/a1234/AndroidStudioProjects/ssrdroid-client/lib_core/.cxx/Debug/c6u3p2s4/arm64-v8a'
C/C++: /Users/a1234/Library/Android/sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang \
    --target=aarch64-none-linux-android21\
    --sysroot=/Users/a1234/Library/Android/sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/darwin-x86_64/sysroot\
    -DUSE_STATIC_MBEDTLS_LIBRARY\
    -I/Users/a1234/AndroidStudioProjects/ssrdroid-client/lib_core/src/main/jni/re2\
    -I/Users/a1234/AndroidStudioProjects/ssrdroid-client/lib_core/src/main/jni/ssrNative/depends/mbedtls/include\
    -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong\
    -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -Wall -Wextra\
    -std=gnu99 -Wall -Wextra -W -Wdeclaration-after-statement -Wwrite-strings -Wpointer-arith\
    -Wimplicit-fallthrough -Wshadow -Wmissing-declarations -Wmissing-prototypes -Wdocumentation\
    -Wno-documentation-deprecated-sync -Wunreachable-code -O0 -g3 -fPIC -MD -MT\
    ssrNative/depends/mbedtls/library/CMakeFiles/mbedcrypto.dir/base64.c.o -MF\
    ssrNative/depends/mbedtls/library/CMakeFiles/mbedcrypto.dir/base64.c.o.d\
    -o ssrNative/depends/mbedtls/library/CMakeFiles/mbedcrypto.dir/base64.c.o\
    -c /Users/a1234/AndroidStudioProjects/ssrdroid-client/lib_core/src/main/jni/ssrNative/depends/mbedtls/library/base64.c

C/C++: /Users/a1234/AndroidStudioProjects/ssrdroid-client/lib_core/src/main/jni/ssrNative/depends/mbedtls/library/base64.c:48:10:\
    fatal error: 'mbedtls/config.h' file not found
C/C++: #include "mbedtls/config.h"
C/C++:          ^~~~~~~~~~~~~~~~~~
C/C++: 1 error generated.

客戶端編譯報錯,找不到mbedtls/config.h
但實際上是有的

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.