Comments (5)
为什么删除dns选项?
from shell.
为什么删除dns选项?
Because I use my system resolver instead of public DNS, but even if I don't delete any line inside config, it's stop working after reboot. Reminding: speak about ss-rust with plugins. All other stuff working fine like ss-go2 with plugins or ss-libev with plugins.
from shell.
ss-libev 和 ss-rust 配置文件中 dns 选项 key表示的名字 不一样,ss-libev 是 nameserver,ss-rust 是 dns,为了共用配置文件,于是,取了个巧,直接在ss-rust 启动文件 里面尝试获取 nameserver 的值,获取不到会直接退出,停止启动。这就是为什么你删除了配置文件中的dns选项会不能工作的原因。至于 ss-go2 为什么正常,是因为启动脚本中的它没有用到 dns 选项。
get_config_args(){
local JsonFilePath=$1
if [ ! -f $JsonFilePath ]; then
echo "$NAME config file $JsonFilePath not found"
exit 1
fi
if [ ! "$(command -v jq)" ]; then
echo "Cannot find dependent package 'jq' Please use yum or apt to install and try again"
exit 1
fi
NameServer=$(cat ${JsonFilePath} | jq -r .nameserver)
[ -z "$NameServer" ] && echo -e "Configuration option 'nameserver' acquisition failed" && exit 1
}
do_start() {
if check_running; then
echo "$NAME (pid $PID) is already running."
return 0
fi
ulimit -n 51200
get_config_args $CONF
nohup $DAEMON -c $CONF --dns $NameServer -vvv > $LOG 2>&1 &
check_pid
echo $get_pid > $PID_FILE
if check_running; then
echo "Starting $NAME success"
else
echo "Starting $NAME failed"
RET_VAL=1
fi
}
表现在代码中,也就是上面两段,嗯!!!或许可以做个判断。
from shell.
I'm not a tech guy and prefer automation. So I don't know how to apply all of this stuff.
from shell.
应该修复了,你可以试试。
from shell.
Related Issues (20)
- New ciphers HOT 2
- acme申请证书的选项
- 请问可以支持一下AEAD-2022 ciphers 吗 HOT 2
- 错误 - 语法错误 | Bug - Syntex error HOT 3
- 重启服务后,多个程序重复出现 HOT 4
- 仍然不會自動更新 SSL 證書
- OpenWRT client
- 如何手动开启端口
- 如何安装rng-tools
- 谁能给一个 dns-only 域名
- Shadowsocks+V2ray+Nginx+域名伪装 出现问题 HOT 1
- 可以支持nat vps安装吗?
- 请问v2ray-plugin如何搭配shadowsocks-manager多端口使用
- 纯IPv6 vps
- SS-rust 怎样设置一次开启多个端口?
- 重启显示成功,但是状态一直是已安装未启动。
- 安装报错 ‘安装 iptables-persistent 失败’
- Doesn't connect to GitHub HOT 1
- AlmaLinux 9 - Install fails HOT 1
- centos 9 安装失败 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shell.