chore(release): package toml client configs

This commit is contained in:
wweir
2026-04-25 03:20:41 +08:00
parent 9c2aa3af10
commit 0ef0686530
7 changed files with 57 additions and 160 deletions
-100
View File
@@ -1,100 +0,0 @@
# 远程、上游连接方式
remote {
type = "sower"
addr = "proxy.com"
password = "I_am_Passw0rd"
# type="socks5"
# addr="127.0.0.1:7890"
}
dns {
disable = false
# 监听该 IP 的 UDP(53)、TCP(80、443) 端口,DNS 会将请求导向这个地址
serve = "127.0.0.1"
# serve6 = "<ipv6>"
# 监听的网络接口
# serve_iface = "lo"
# 必填,优先使用 DHCP 中的 DNS 服务器,如果没有则使用该地址
fallback = "223.5.5.5"
}
socks_5 {
disable = false
# 不写 IP 则监听所有 IP
addr = "127.0.0.1:1080"
}
# 路由规则,各规则优先级:
# 禁止访问规则 > 直接访问规则 > 代理访问规则 > GEOIP 规则
# file 字段可填 URL 或本地文件路径,URL 将通过代理请求
# 禁止访问规则。被命中的请求,将被禁止访问。可用于广告过滤之类的目的
router "block" {
file = "https://raw.githubusercontent.com/pexcn/daily/gh-pages/adlist/adlist.txt"
rules = []
}
# 直接访问规则。被命中的请求,将被直接访问,不再通过代理
router "direct" {
file = "https://raw.githubusercontent.com/pexcn/daily/gh-pages/chinalist/chinalist.txt"
rules = [
"imap.*.*",
"imap.*.*.*",
"smtp.*.*",
"smtp.*.*.*",
"pop.*.*",
"pop.*.*.*",
"pop3.*.*",
"pop3.*.*.*",
"**.cn",
]
}
# 代理访问规则。被命中的请求,将通过代理进行转发
router "proxy" {
file = "https://raw.githubusercontent.com/pexcn/daily/gh-pages/gfwlist/gfwlist.txt"
rules = [
"**.google.*",
"**.goo.gl",
"**.googleusercontent.com",
"**.googleapis.com",
"*.googlesource.com",
"**.youtube.com",
"**.ytimg.com",
"**.ggpht.com",
"**.googlevideo.com",
"**.facebook.com",
"**.fbcdn.net",
"**.twitter.com",
"**.twimg.com",
"**.blogspot.com",
"**.appspot.com",
"**.wikipedia.org",
"**.wikimedia.org",
"*.cloudfront.net",
"**.amazon.com",
"**.amazonaws.com",
"*.githubusercontent.com",
"*.githubassets.com",
"*.github.*",
"lookup-api.apple.com",
]
}
# GEOIP 规则。大陆境内的 IP,将直接访问。
# 非大陆境内的 IP,将通过另一套检测逻辑,确定是否需要进行代理。
# 为避免误伤一些非标页面端口(除 80/443 外),该规则只在 Socks5 模式下生效
router "country" {
// mmdb = "Country.mmdb" # https://github.com/alecthw/mmdb_china_ip_list
file = "https://raw.githubusercontent.com/pexcn/daily/gh-pages/chnroute/chnroute.txt"
rules = [
"127.0.0.0/8",
"172.16.0.0/12",
"192.168.0.0/16",
"10.0.0.0/8",
"17.0.0.0/8",
"100.64.0.0/10",
"224.0.0.0/4",
"fe80::/10",
]
}
+3 -3
View File
@@ -7,8 +7,8 @@
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/sower</string>
<string>-f</string>
<string>/usr/local/etc/sower/sower.hcl</string>
<string>-c</string>
<string>/usr/local/etc/sower/sower.toml</string>
</array>
<key>KeepAlive</key>
<true/>
@@ -17,4 +17,4 @@
<key>WorkingDirectory</key>
<string>/usr/local/etc/sower</string>
</dict>
</plist>
</plist>
+2 -2
View File
@@ -5,9 +5,9 @@ After=network.target
[Service]
Type=simple
WorkingDirectory=/etc/sower
ExecStart=/usr/local/bin/sower -c /etc/sower/sower.hcl
ExecStart=/usr/local/bin/sower -c /etc/sower/sower.toml
Restart=on-failure
RestartSec=1min
[Install]
WantedBy=multi-user.target
WantedBy=multi-user.target
+25 -25
View File
@@ -1,36 +1,32 @@
[remote] # 远程、上游连接方式
# Remote upstream connection.
[remote]
type = "sower"
addr = "proxy.com"
password = "I_am_Passw0rd"
# type: "socks5"
# addr: "127.0.0.1:7890"
addr = "proxy.example.com"
password = "your_secure_password"
# type = "socks5"
# addr = "127.0.0.1:7890"
[dns]
disable = false
# 监听该 IP 的 UDP(53)、TCP(80、443) 端口,DNS 会将请求导向这个地址
# DNS replies for proxied A/AAAA records point clients to this address.
serve = "127.0.0.1"
# serve6 = <ipv6>
# 监听的网络接口
# serve_6 = "::1"
# serve_iface = "lo"
# 必填,优先使用 DHCP 中的 DNS 服务器,如果没有则使用该地址
fallback = "223.5.5.5"
[socks_5]
disable = false
# 不写 IP 则监听所有 IP
addr = "127.0.0.1:1080"
# 路由规则,各规则优先级:
# 禁止访问规则 > 直接访问规则 > 代理访问规则 > GEOIP 规则
# file 字段可填 URL 或本地文件路径,URL 将通过代理请求
# 禁止访问规则。被命中的请求,将被禁止访问。可用于广告过滤之类的目的
# Routing priority:
# block > direct > proxy > geo.
[router.block]
file = "https://raw.githubusercontent.com/pexcn/daily/gh-pages/adlist/adlist.txt"
file_skip_rules = [
"t.co",
]
rules = []
# 直接访问规则。被命中的请求,将被直接访问,不再通过代理
[router.direct]
file = "https://raw.githubusercontent.com/pexcn/daily/gh-pages/chinalist/chinalist.txt"
rules = [
@@ -45,7 +41,6 @@ rules = [
"**.cn",
]
# 代理访问规则。被命中的请求,将通过代理进行转发
[router.proxy]
file = "https://raw.githubusercontent.com/pexcn/daily/gh-pages/gfwlist/gfwlist.txt"
rules = [
@@ -69,17 +64,22 @@ rules = [
"*.cloudfront.net",
"**.amazon.com",
"**.amazonaws.com",
"*.githubusercontent.com",
"*.githubassets.com",
"*.github.*",
"**.github.com",
"**.githubusercontent.com",
"**.githubassets.com",
"**.githubcopilot.com",
"t.co",
"lookup-api.apple.com",
"**.openai.com",
"**.chatgpt.com",
"**.oaistatic.com",
"**.oaiusercontent.com",
"platform.api.openai.org",
]
# GEOIP 规则。大陆境内的 IP,将直接访问。
# 非大陆境内的 IP,将通过另一套检测逻辑,确定是否需要进行代理。
# 为避免误伤一些非标页面端口(除 80/443 外),该规则只在 Socks5 模式下生效
[router.country]
mmdb = "Country.mmdb" # https://github.com/alecthw/mmdb_china_ip_list
# mmdb is optional. Leave it empty or unset to disable GeoIP lookup and use CIDR rules only.
# mmdb = "Country.mmdb"
file = "https://raw.githubusercontent.com/pexcn/daily/gh-pages/chnroute/chnroute.txt"
rules = [
"127.0.0.0/8",
+18 -21
View File
@@ -1,35 +1,28 @@
remote: # 远程、上游连接方式
remote:
type: "sower"
addr: "proxy.com"
password: "I_am_Passw0rd"
addr: "proxy.example.com"
password: "your_secure_password"
# type: "socks5"
# addr: "127.0.0.1:7890"
dns:
disable: false
# 监听该 IP 的 UDP(53)、TCP(80、443) 端口,DNS 会将请求导向这个地址
serve: "127.0.0.1"
# serve6: <ipv6>
# 监听的网络接口
# serve_6: "::1"
# serve_iface: "lo"
# 必填,优先使用 DHCP 中的 DNS 服务器,如果没有则使用该地址
fallback: "223.5.5.5"
socks_5:
disable: false
# 不写 IP 则监听所有 IP
addr: "127.0.0.1:1080"
# 路由规则,各规则优先级:
# 禁止访问规则 > 直接访问规则 > 代理访问规则 > GEOIP 规则
# file 字段可填 URL 或本地文件路径,URL 将通过代理请求
router:
# 禁止访问规则。被命中的请求,将被禁止访问。可用于广告过滤之类的目的
block:
file: "https://raw.githubusercontent.com/pexcn/daily/gh-pages/adlist/adlist.txt"
file_skip_rules:
- "t.co"
rules: []
# 直接访问规则。被命中的请求,将被直接访问,不再通过代理
direct:
file: "https://raw.githubusercontent.com/pexcn/daily/gh-pages/chinalist/chinalist.txt"
rules:
@@ -43,7 +36,6 @@ router:
- "pop3.*.*.*"
- "**.cn"
# 代理访问规则。被命中的请求,将通过代理进行转发
proxy:
file: "https://raw.githubusercontent.com/pexcn/daily/gh-pages/gfwlist/gfwlist.txt"
rules:
@@ -67,16 +59,21 @@ router:
- "*.cloudfront.net"
- "**.amazon.com"
- "**.amazonaws.com"
- "*.githubusercontent.com"
- "*.githubassets.com"
- "*.github.*"
- "**.github.com"
- "**.githubusercontent.com"
- "**.githubassets.com"
- "**.githubcopilot.com"
- "t.co"
- "lookup-api.apple.com"
- "**.openai.com"
- "**.chatgpt.com"
- "**.oaistatic.com"
- "**.oaiusercontent.com"
- "platform.api.openai.org"
# GEOIP 规则。大陆境内的 IP,将直接访问。
# 非大陆境内的 IP,将通过另一套检测逻辑,确定是否需要进行代理。
# 为避免误伤一些非标页面端口(除 80/443 外),该规则只在 Socks5 模式下生效
country:
mmdb: "Country.mmdb" # https://github.com/alecthw/mmdb_china_ip_list
# mmdb is optional. Leave it empty or unset to disable GeoIP lookup and use CIDR rules only.
# mmdb: "Country.mmdb"
file: "https://raw.githubusercontent.com/pexcn/daily/gh-pages/chnroute/chnroute.txt"
rules:
- "127.0.0.0/8"
+1 -1
View File
@@ -1 +1 @@
CreateObject("WScript.Shell").Run "C:\Software\Sower\sower.exe -f sower.hcl",0
CreateObject("WScript.Shell").Run "C:\Software\Sower\sower.exe -c sower.toml",0
+8 -8
View File
@@ -18,32 +18,32 @@ jobs:
mv .github/* . || true
make build GO='GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go'
tar czvf sower-linux-amd64.tar.gz sower sowerd sower.hcl sower.yaml sower.toml sower.service sowerd.service
tar czvf sower-linux-amd64.tar.gz sower sowerd sower.toml sower.yaml sower.service sowerd.service
make clean
make build GO='GOOS=linux GOARCH=arm CGO_ENABLED=0 go'
tar czvf sower-linux-arm.tar.gz sower sowerd sower.hcl sower.yaml sower.toml sower.service sowerd.service
tar czvf sower-linux-arm.tar.gz sower sowerd sower.toml sower.yaml sower.service sowerd.service
make clean
make build GO='GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go'
tar czvf sower-linux-arm64.tar.gz sower sowerd sower.hcl sower.yaml sower.toml sower.service sowerd.service
tar czvf sower-linux-arm64.tar.gz sower sowerd sower.toml sower.yaml sower.service sowerd.service
make clean
make build GO='GOOS=linux GOARCH=mips CGO_ENABLED=0 go'
tar czvf sower-linux-mips.tar.gz sower sowerd sower.hcl sower.yaml sower.toml sower.service sowerd.service
tar czvf sower-linux-mips.tar.gz sower sowerd sower.toml sower.yaml sower.service sowerd.service
make clean
make build GO='GOOS=linux GOARCH=mipsle CGO_ENABLED=0 go'
tar czvf sower-linux-mipsle.tar.gz sower sowerd sower.hcl sower.yaml sower.toml sower.service sowerd.service
tar czvf sower-linux-mipsle.tar.gz sower sowerd sower.toml sower.yaml sower.service sowerd.service
make clean
make build GO='GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go'
tar czvf sower-darwin-amd64.tar.gz sower sowerd sower.hcl sower.yaml sower.toml sower.plist
tar czvf sower-darwin-amd64.tar.gz sower sowerd sower.toml sower.yaml sower.plist
make clean
make build GO='GOOS=darwin GOARCH=arm64 CGO_ENABLED=0 go'
tar czvf sower-darwin-arm64.tar.gz sower sowerd sower.hcl sower.yaml sower.toml sower.plist
tar czvf sower-darwin-arm64.tar.gz sower sowerd sower.toml sower.yaml sower.plist
make clean
make build GO='GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go'
mv sower sower.exe
mv sowerd sowerd.exe
tar czvf sower-windows-amd64.tar.gz sower.exe sowerd.exe sower.hcl sower.yaml sower.toml sower_run.vbs
tar czvf sower-windows-amd64.tar.gz sower.exe sowerd.exe sower.toml sower.yaml sower_run.vbs
make clean
- uses: ncipollo/release-action@v1