github.com/database64128/shadowsocks-go@v1.10.2-0.20240315062903-143a773533f1/docs/config.json (about) 1 { 2 "servers": [ 3 { 4 "name": "socks5", 5 "protocol": "socks5", 6 "mtu": 1500, 7 "listen": ":1080", 8 "listenerFwmark": 52140, 9 "listenerTrafficClass": 0, 10 "enableTCP": true, 11 "listenerTFO": true, 12 "disableInitialPayloadWait": false, 13 "enableUDP": true, 14 "natTimeoutSec": 300, 15 "udpBatchMode": "sendmmsg", 16 "udpRelayBatchSize": 64, 17 "udpServerRecvBatchSize": 512, 18 "udpSendChannelCapacity": 1024 19 }, 20 { 21 "name": "socks5-multi-listeners", 22 "protocol": "socks5", 23 "tcpListeners": [ 24 { 25 "network": "tcp", 26 "address": ":1081", 27 "fwmark": 52140, 28 "trafficClass": 0, 29 "reusePort": true, 30 "fastOpen": true, 31 "fastOpenBacklog": 0, 32 "fastOpenFallback": false, 33 "disableInitialPayloadWait": false, 34 "initialPayloadWaitTimeout": "250ms", 35 "initialPayloadWaitBufferSize": 1440 36 }, 37 { 38 "network": "tcp", 39 "address": ":1081", 40 "fwmark": 52140, 41 "trafficClass": 0, 42 "reusePort": true, 43 "fastOpen": true, 44 "fastOpenBacklog": 0, 45 "fastOpenFallback": false, 46 "disableInitialPayloadWait": false, 47 "initialPayloadWaitTimeout": "250ms", 48 "initialPayloadWaitBufferSize": 1440 49 }, 50 { 51 "network": "tcp4", 52 "address": ":1082", 53 "fwmark": 52140, 54 "trafficClass": 0, 55 "reusePort": false, 56 "fastOpen": true, 57 "fastOpenBacklog": 0, 58 "fastOpenFallback": false, 59 "disableInitialPayloadWait": false, 60 "initialPayloadWaitTimeout": "250ms", 61 "initialPayloadWaitBufferSize": 1440 62 }, 63 { 64 "network": "tcp6", 65 "address": "[::1]:1082", 66 "fwmark": 52140, 67 "trafficClass": 0, 68 "reusePort": false, 69 "fastOpen": true, 70 "fastOpenBacklog": 0, 71 "fastOpenFallback": false, 72 "disableInitialPayloadWait": false, 73 "initialPayloadWaitTimeout": "250ms", 74 "initialPayloadWaitBufferSize": 1440 75 } 76 ], 77 "udpListeners": [ 78 { 79 "network": "udp", 80 "address": ":1081", 81 "fwmark": 52140, 82 "trafficClass": 0, 83 "reusePort": true, 84 "batchMode": "", 85 "relayBatchSize": 0, 86 "serverRecvBatchSize": 0, 87 "sendChannelCapacity": 0, 88 "natTimeout": "180s" 89 }, 90 { 91 "network": "udp", 92 "address": ":1081", 93 "fwmark": 52140, 94 "trafficClass": 0, 95 "reusePort": true, 96 "batchMode": "", 97 "relayBatchSize": 0, 98 "serverRecvBatchSize": 0, 99 "sendChannelCapacity": 0, 100 "natTimeout": "180s" 101 }, 102 { 103 "network": "udp4", 104 "address": ":1082", 105 "fwmark": 52140, 106 "trafficClass": 0, 107 "reusePort": false, 108 "batchMode": "", 109 "relayBatchSize": 0, 110 "serverRecvBatchSize": 0, 111 "sendChannelCapacity": 0, 112 "natTimeout": "180s" 113 }, 114 { 115 "network": "udp6", 116 "address": "[::1]:1082", 117 "fwmark": 52140, 118 "trafficClass": 0, 119 "reusePort": false, 120 "batchMode": "", 121 "relayBatchSize": 0, 122 "serverRecvBatchSize": 0, 123 "sendChannelCapacity": 0, 124 "natTimeout": "180s" 125 } 126 ], 127 "mtu": 1500 128 }, 129 { 130 "name": "http", 131 "protocol": "http", 132 "listen": ":8080", 133 "listenerFwmark": 52140, 134 "listenerTrafficClass": 0, 135 "enableTCP": true, 136 "listenerTFO": true, 137 "disableInitialPayloadWait": false 138 }, 139 { 140 "name": "tproxy", 141 "protocol": "tproxy", 142 "mtu": 1500, 143 "listen": ":12345", 144 "listenerFwmark": 52140, 145 "listenerTrafficClass": 0, 146 "enableTCP": true, 147 "listenerTFO": true, 148 "disableInitialPayloadWait": false, 149 "enableUDP": true, 150 "natTimeoutSec": 150, 151 "udpBatchMode": "sendmmsg", 152 "udpRelayBatchSize": 64, 153 "udpServerRecvBatchSize": 1024, 154 "udpSendChannelCapacity": 1024 155 }, 156 { 157 "name": "tunnel", 158 "protocol": "direct", 159 "mtu": 1500, 160 "listen": ":53", 161 "listenerFwmark": 52140, 162 "listenerTrafficClass": 0, 163 "enableTCP": true, 164 "listenerTFO": true, 165 "disableInitialPayloadWait": false, 166 "enableUDP": true, 167 "natTimeoutSec": 60, 168 "udpBatchMode": "sendmmsg", 169 "udpRelayBatchSize": 2, 170 "udpServerRecvBatchSize": 8, 171 "udpSendChannelCapacity": 64, 172 "tunnelRemoteAddress": "[2606:4700:4700::1111]:53", 173 "tunnelUDPTargetOnly": false 174 }, 175 { 176 "name": "ss-2022", 177 "protocol": "2022-blake3-aes-128-gcm", 178 "mtu": 1500, 179 "listen": ":20220", 180 "listenerFwmark": 52140, 181 "listenerTrafficClass": 0, 182 "enableTCP": true, 183 "listenerTFO": true, 184 "disableInitialPayloadWait": false, 185 "enableUDP": true, 186 "natTimeoutSec": 150, 187 "udpBatchMode": "sendmmsg", 188 "udpRelayBatchSize": 64, 189 "udpServerRecvBatchSize": 512, 190 "udpSendChannelCapacity": 1024, 191 "allowSegmentedFixedLengthHeader": false, 192 "psk": "qQln3GlVCZi5iJUObJVNCw==", 193 "uPSKStorePath": "/etc/shadowsocks-go/upsks.json", 194 "paddingPolicy": "", 195 "rejectPolicy": "", 196 "slidingWindowFilterSize": 256 197 } 198 ], 199 "clients": [ 200 { 201 "name": "ss-2022-a", 202 "protocol": "2022-blake3-aes-128-gcm", 203 "endpoint": "[2001:db8:bd63:362c:2071:a0f6:827:ab6a]:20220", 204 "dialerFwmark": 52140, 205 "dialerTrafficClass": 0, 206 "enableTCP": true, 207 "dialerTFO": true, 208 "tcpFastOpenFallback": false, 209 "allowSegmentedFixedLengthHeader": false, 210 "enableUDP": true, 211 "mtu": 1500, 212 "psk": "oE/s2z9Q8EWORAB8B3UCxw==", 213 "iPSKs": [ 214 "qQln3GlVCZi5iJUObJVNCw==" 215 ], 216 "paddingPolicy": "", 217 "slidingWindowFilterSize": 256 218 }, 219 { 220 "name": "ss-2022-b", 221 "protocol": "2022-blake3-aes-128-gcm", 222 "tcpAddress": "[2001:db8:a2bf:f3ef:903a:4fd1:f986:5934]:20221", 223 "udpAddress": "[2001:db8:a2bf:f3ef:903a:4fd1:f986:5934]:20222", 224 "dialerFwmark": 52140, 225 "dialerTrafficClass": 0, 226 "enableTCP": true, 227 "dialerTFO": true, 228 "tcpFastOpenFallback": false, 229 "allowSegmentedFixedLengthHeader": false, 230 "enableUDP": true, 231 "mtu": 1500, 232 "psk": "QzhDwx0lKZ+0Sustgwtjtw==", 233 "iPSKs": [ 234 "McxLxNcqHUb01ZedJfp55g==" 235 ], 236 "paddingPolicy": "", 237 "slidingWindowFilterSize": 256 238 }, 239 { 240 "name": "direct", 241 "protocol": "direct", 242 "dialerFwmark": 52140, 243 "dialerTrafficClass": 0, 244 "enableTCP": true, 245 "dialerTFO": true, 246 "tcpFastOpenFallback": false, 247 "enableUDP": true, 248 "mtu": 1500 249 }, 250 { 251 "name": "direct4", 252 "protocol": "direct", 253 "network": "ip4", 254 "dialerFwmark": 52140, 255 "dialerTrafficClass": 0, 256 "enableTCP": true, 257 "dialerTFO": true, 258 "tcpFastOpenFallback": false, 259 "enableUDP": true, 260 "mtu": 1500 261 }, 262 { 263 "name": "direct6", 264 "protocol": "direct", 265 "network": "ip6", 266 "dialerFwmark": 52140, 267 "dialerTrafficClass": 0, 268 "enableTCP": true, 269 "dialerTFO": true, 270 "tcpFastOpenFallback": false, 271 "enableUDP": true, 272 "mtu": 1500 273 } 274 ], 275 "dns": [ 276 { 277 "name": "cf-v6", 278 "addrPort": "[2606:4700:4700::1111]:53", 279 "tcpClientName": "ss-2022-a", 280 "udpClientName": "ss-2022-a" 281 }, 282 { 283 "name": "systemd-resolved", 284 "addrPort": "127.0.0.53:53", 285 "tcpClientName": "direct", 286 "udpClientName": "direct" 287 }, 288 { 289 "name": "system", 290 "type": "system" 291 } 292 ], 293 "router": { 294 "defaultTCPClientName": "ss-2022-a", 295 "defaultUDPClientName": "ss-2022-a", 296 "geoLite2CountryDbPath": "/usr/share/shadowsocks-go/Country.mmdb", 297 "domainSets": [ 298 { 299 "name": "example", 300 "type": "text", 301 "path": "/usr/share/shadowsocks-go/ss-go-example.txt" 302 }, 303 { 304 "name": "example-gob", 305 "type": "gob", 306 "path": "/usr/share/shadowsocks-go/ss-go-gob-example" 307 } 308 ], 309 "prefixSets": [ 310 { 311 "name": "private", 312 "path": "private.txt" 313 } 314 ], 315 "routes": [ 316 { 317 "name": "example", 318 "network": "udp", 319 "client": "ss-2022-b", 320 "resolver": "cf-v6", 321 "fromServers": [ 322 "socks5", 323 "tunnel" 324 ], 325 "fromUsers": [ 326 "Steve", 327 "Alex" 328 ], 329 "fromPorts": [ 330 12345, 331 54321 332 ], 333 "fromPortRanges": "12345,32768-60999", 334 "fromPrefixes": [ 335 "127.0.0.1/32", 336 "::1/128" 337 ], 338 "fromPrefixSets": [ 339 "private" 340 ], 341 "fromGeoIPCountries": [ 342 "US" 343 ], 344 "toPorts": [ 345 443 346 ], 347 "toPortRanges": "80,443,8443", 348 "toDomains": [ 349 "example.com" 350 ], 351 "toDomainSets": [ 352 "example" 353 ], 354 "toMatchedDomainExpectedPrefixes": [ 355 "::/0" 356 ], 357 "toMatchedDomainExpectedPrefixSets": [ 358 "private" 359 ], 360 "toMatchedDomainExpectedGeoIPCountries": [ 361 "US" 362 ], 363 "toPrefixes": [ 364 "::/0" 365 ], 366 "toPrefixSets": [ 367 "private" 368 ], 369 "toGeoIPCountries": [ 370 "US" 371 ], 372 "disableNameResolutionForIPRules": false, 373 "invertFromServers": false, 374 "invertFromUsers": false, 375 "invertFromPrefixes": false, 376 "invertFromGeoIPCountries": false, 377 "invertFromPorts": false, 378 "invertToDomains": false, 379 "invertToMatchedDomainExpectedPrefixes": false, 380 "invertToMatchedDomainExpectedGeoIPCountries": false, 381 "invertToPrefixes": false, 382 "invertToGeoIPCountries": false, 383 "invertToPorts": false 384 } 385 ] 386 }, 387 "stats": { 388 "enabled": true 389 }, 390 "api": { 391 "enabled": true, 392 "debugPprof": false, 393 "enableTrustedProxyCheck": false, 394 "trustedProxies": [], 395 "proxyHeader": "X-Forwarded-For", 396 "listen": ":20221", 397 "certFile": "", 398 "keyFile": "", 399 "clientCertFile": "", 400 "secretPath": "4paZvyoK3dCjyQXU33md5huJMMYVD9o8", 401 "fiberConfigPath": "" 402 } 403 }