txthinking / brook

A cross-platform programmable network tool
https://brook.app
GNU General Public License v3.0
14.6k stars 2.4k forks source link

脚本:支持同时指定多个 Server,让指定 DST 走指定的 Server #1211

Closed txthinking closed 1 year ago

txthinking commented 1 year ago

design

f := func(){
    if in_address {
        if in_address.domainaddress == "xxx.com:1234" {
            return { brooklink: "brook://...a.server..." }
        }
        if in_address.ipaddress == "1.2.3.4:5678" {
            return { brooklink: "brook://...another.server..." }
        }
        return
    }
}
out := f()
txthinking-bot commented 1 year ago

我之前说的就是需要这个功能👍 by 特朗普

txthinking-bot commented 1 year ago

还有一个设备,等这个功能就所有设备 all in brook 了 by 特朗普

txthinking commented 1 year ago
f := func() {
    if in_brooklinks {
        return {a: "brook://...", b: "brook://..."}
    }
    if in_address {
        if in_address.domainaddress {
            if in_address.domainaddress == "example.com:443" {
                return { "brooklinkkey": "a" }
            }
            if in_address.domainaddress == "example2.com:443" {
                return { "brooklinkkey": "b" }
            }
        }
        return
    }
}
out := f()

v20230606