Coder Social home page Coder Social logo

Comments (2)

zfl9 avatar zfl9 commented on August 20, 2024

没有,你可能没有理解对。

-m xxx.list 指定的域名列表,属于 tag:chn,tag:chn 只会走 china 上游
-g xxx.list 指定的域名列表,属于 tag:gfw,tag:gfw 只会走 trust 上游
-d xxx 用于指定默认的tag(未匹配任何列表的域名的tag),可用值:chn、gfw、none

from chinadns-ng.

zfl9 avatar zfl9 commented on August 20, 2024

事实上,利用这几个简单的选项,可以实现 global、gfwlist、chnroute、回国模式 等等。

比如 ss-tproxy 中的用例:

    if is_global_mode; then
        # 全局模式(ignlist.ext的走china,其他走trust)
        sstp_pid_chinadns=$(
            chinadns-ng \
            $args \
            -m <(list_ext_domain ignlist.ext) \
            -d gfw \
            -a sstp_white,sstp_white6 \
            </dev/null &>>$chinadns_logfile &
            echo $!
        )
    elif is_gfwlist_mode; then
        # gfw模式(gfwlist.txt的走trust,其他走china)
        sstp_pid_chinadns=$(
            chinadns-ng \
            $args \
            -g gfwlist.txt,<(list_ext_domain gfwlist.ext) \
            -d chn \
            -A sstp_black,sstp_black6 \
            </dev/null &>>$chinadns_logfile &
            echo $!
        )
    else # chnroute
        sstp_pid_chinadns=$(
            chinadns-ng \
            $args \
            -m chnlist.txt,<(list_ext_domain ignlist.ext) \
            -g gfwlist.txt,<(list_ext_domain gfwlist.ext) \
            $(is_true "$chinadns_chnlist_first" && echo '-M') \
            -a sstp_white,sstp_white6 \
            -A sstp_black,sstp_black6 \
            -4 sstp_white -6 sstp_white6 \
            </dev/null &>>$chinadns_logfile &
            echo $!
        )
    fi

from chinadns-ng.

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.