Giter Site home page Giter Site logo

Installation misconfigured about shell HOT 5 CLOSED

asterriya avatar asterriya commented on May 23, 2024
Installation misconfigured

from shell.

Comments (5)

loyess avatar loyess commented on May 23, 2024

为什么删除dns选项?

from shell.

asterriya avatar asterriya commented on May 23, 2024

为什么删除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.

loyess avatar loyess commented on May 23, 2024

ss-libev 和 ss-rust 配置文件中 dns 选项 key表示的名字 不一样,ss-libev 是 nameserver,ss-rust 是 dns,为了共用配置文件,于是,取了个巧,直接在ss-rust 启动文件 里面尝试获取 nameserver 的值,获取不到会直接退出,停止启动。这就是为什么你删除了配置文件中的dns选项会不能工作的原因。至于 ss-go2 为什么正常,是因为启动脚本中的它没有用到 dns 选项。

shadowsocks-rust.sh#L74-L89

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
}

shadowsocks-rust.sh#L104-L120

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.

asterriya avatar asterriya commented on May 23, 2024

I'm not a tech guy and prefer automation. So I don't know how to apply all of this stuff.

from shell.

loyess avatar loyess commented on May 23, 2024

应该修复了,你可以试试。

from shell.

Related Issues (20)

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.