add upstream proxy support for creator

This commit is contained in:
kulikov0 committed 2026-05-30 15:39:12 +02:00
1 parent 48dcb04c77
commit 000447b77c
21 files changed
+713 -84

No files matched your search

+4
View File
@@ -22,6 +22,9 @@ func main() {
customReadBuf := flag.Int("read-buf", 0, "DC read buffer size in bytes, used with -resources custom")
customMemLimit := flag.Int64("mem-limit", 0, "memory limit in bytes, used with -resources custom")
writeFile := flag.String("write-file", "", "path to file where active room id is appended")
upstreamSocks := flag.String("upstream-socks", "", "route tunneled egress through this SOCKS5 proxy (host:port), e.g. a local VPN client")
upstreamUser := flag.String("upstream-user", "", "upstream SOCKS5 username")
upstreamPass := flag.String("upstream-pass", "", "upstream SOCKS5 password")
flag.Parse()
var readBuf int
@@ -113,6 +116,7 @@ func main() {
mode = "dc"
}
activeBridge = tunnel.NewRelayBridge(tun, "creator", bridgeReadBuf, log.Printf)
activeBridge.SetUpstreamSocks(*upstreamSocks, *upstreamUser, *upstreamPass)
activeBridge.SetOnPeerConfig(func(fps, batch, trackCount int) {
sess.AdaptTrackCount(trackCount)
})