zu1k / srun Goto Github PK
View Code? Open in Web Editor NEWsrun 深澜认证登录,超轻量、多平台,支持多拨、自动探测IP、指定网卡
License: GNU General Public License v3.0
srun 深澜认证登录,超轻量、多平台,支持多拨、自动探测IP、指定网卡
License: GNU General Public License v3.0
Compatible versions based on usage feedback statistics.
Hello!
Is there any available version for a router which was installed a openwrt system?thanks.
[root@Router ~]$ ./sdusrun-mipsel-unknown-linux-musl login -c config.json
login user: User {
username: "schoolcode@unicom",
password: "pwd",
ip: Some(
"10.8.135.11",
),
if_name: None,
}
ChallengeResponse {
challenge: Some(
"0e367f2a93c10d48caca8b91a78629fa3a81b9d93cee0db97eb53e5c31395273",
),
client_ip: "10.8.135.11",
ecode: I(
0,
),
error_msg: "",
expire: Some(
"60",
),
online_ip: "10.8.135.11",
res: "ok",
srun_ver: "SRunCGIAuthIntfSvr V1.18 B20201030",
st: 1652834055,
}
will try at most 1 times...
try 1/1: failed
PortalResponse {
server_flag: 0,
services_intf_server_ip: "",
services_intf_server_port: "",
access_token: "",
checkout_date: 0,
ecode: S(
"",
),
error: "login_error",
error_msg: "Nas type not found.",
client_ip: "10.8.135.11",
online_ip: "10.8.135.11",
real_name: "",
remain_flux: 0,
remain_times: 0,
res: "login_error",
srun_ver: "SRunCGIAuthIntfSvr V1.18 B20201030",
suc_msg: "",
sysver: "",
username: "",
wallet_balance: 0,
st: 1652834055,
}
login user: User {
username: "schoolcode@unicom",
password: "passwd",
ip: None,
if_name: Some(
"eth0.5",
),
}
ChallengeResponse {
challenge: Some(
"0e367f2a93c10d48caca8b91a78629fa3a81b9d93cee0db97eb53e5c31395273",
),
client_ip: "10.8.135.11",
ecode: I(
0,
),
error_msg: "",
expire: Some(
"57",
),
online_ip: "10.8.135.11",
res: "ok",
srun_ver: "SRunCGIAuthIntfSvr V1.18 B20201030",
st: 1652834058,
}
will try at most 1 times...
try 1/1: failed
PortalResponse {
server_flag: 0,
services_intf_server_ip: "",
services_intf_server_port: "",
access_token: "",
checkout_date: 0,
ecode: S(
"",
),
error: "login_error",
error_msg: "Nas type not found.",
client_ip: "10.8.135.11",
online_ip: "10.8.135.11",
real_name: "",
remain_flux: 0,
remain_times: 0,
res: "login_error",
srun_ver: "SRunCGIAuthIntfSvr V1.18 B20201030",
suc_msg: "",
sysver: "",
username: "",
wallet_balance: 0,
st: 1652834058,
}
[root@Router ~]$ ./sdusrun-mipsel-unknown-linux-musl login
thread 'main' panicked at 'the long_name (second argument) should be longer than a single character, or an empty string for none', /cargo/registry/src/rsproxy.cn-8f6827c7555bfaf8/getopts-0.2.21/src/lib.rs:604:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Aborted
考虑到多拨的虚拟网卡可能会获取到ipv6的地址,而get_ip_by_if_name可能也会因此返回ipv6地址导致登陆失败
同一个if_name具有ipv4/ipv6地址时,应当选择ipv4地址作为get_challenge参数,get_ip_by_if_name函数可能需要修改一下
pub fn get_ip_by_if_name(if_name: &str) -> Option<String> {
let ifs = get_ifs();
for i in ifs {
if i.0.contains(if_name) && i.1.is_ipv4(){
return Some(i.1.to_string());
}
}
None
}
It seems like strict_bind will not work.
The request will follow the route table hitted, which causes strict_bind failed even if a ip is specified to bind.
Need help.
默认情况下登录失败重试10次,测试时直接导致账号被rate limit限制登录了
cpu:
[root@Router ~]$ cat /proc/cpuinfo
system type : MT7621
machine : TGNET_RN1150W
processor : 0
cpu model : MIPS 1004Kc V2.15
BogoMIPS : 583.68
wait instruction : yes
microsecond timers : yes
tlb_entries : 32
extra interrupt vector : yes
hardware watchpoint : yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
isa : mips1 mips2 mips32r1 mips32r2
ASEs implemented : mips16 dsp mt
shadow register sets : 1
kscratch registers : 0
core : 0
VPE : 0
VCED exceptions : not available
VCEI exceptions : not available
/root$ ./sdusrun login -c config.json
read config file error: expected value at line 1 column 1
试图启动但返回如上,求助大佬
心仪的项目,果断star了
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.