Files
BitSrunLoginGo/config.yaml
2024-10-25 16:15:11 +08:00

52 lines
2.3 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

form:
domain: net3.zju.edu.cn #登录地址 ip 或域名
username: "3210300237" #账号
user_type: #运营商类型,详情看下方文字说明
password: "P@ssw0rd" #密码
meta: #登录参数
"n": "200"
type: "1"
acid: "82"
enc: srun_bx1 # enc 不在表单中,但一般都是默认值。你可以使用 --auto-enc 或在 js 中搜索 enc 来找到真实值
os: Windows 10
name: windows
info_prefix: SRBX1 # info 字段前缀括号中的值
double_stack: false
settings:
basic: #基础设置
https: true #访问校园网 API 时使用 https 协议
skip_cert_verify: false #跳过证书有效校验
timeout: 5 #网络请求超时时间(秒,正整数)
interfaces: "" #网卡名称正则注意转义eth0\.[2-3],不为空时为多网卡模式
interfaces_interval: 0 # 秒,多网卡模式切换网卡时触发的等待时间
guardian: #守护模式(后台常驻)
enable: false
duration: 60 #网络检查周期(秒,正整数)
backoff: # 积分退避
enable: false # 开启后同时对所有运行模式生效,作用于登录失败的重试
max_retries: 0 # 为 0 时无限重试直至成功
initial_duration: 2 # 初始失败等待时间,秒
max_duration: 300 # 最大失败等待时间,秒
# 等待时间计算公式详见 https://github.com/Mmx233/BackoffCli
exponent_factor: 1 # 指数因子
inter_const_factor: 0 # 内常数因子,秒
outer_const_factor: 0 # 外常数因子,秒
log:
debug_level: true #打印调试日志
write_file: true #写日志文件
log_path: /root/logs #日志文件存放目录路径
log_name: "srun_login.log" #指定日志文件名
ddns: #校园网内网 ip ddns
enable: true
domain: chizzyhub.dns.navy
ttl: 600
provider: "dynv6"
config: #这段配置是动态的,需要根据 provider 类型配置字段名,见 DDNS 说明
zone: "xxxx"
token: "ns4ReUsNKCSxpJD_zsVBMouGPwxUYS"
reality: #从指定地址模拟浏览器行为进入登录页,如果登录未出现问题不用启用
enable: false
addr: http://www.baidu.com #初始地址,需要使用 http、域名
custom_header: #这段配置是动态的,用于设置请求头,可以自由填写
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0