Optimized stream proxy codebase

- Moved stream proxy config from database to file based conf
- Optimized implementation for detecting proxy rule running
- Fixed #320 (hopefully)
This commit is contained in:
Toby Chui
2024-10-25 23:30:44 +08:00
parent 6923f0d200
commit 528be69fe0
3 changed files with 89 additions and 22 deletions

View File

@@ -262,10 +262,14 @@ func startupSequence() {
webSshManager = sshprox.NewSSHProxyManager()
//Create TCP Proxy Manager
streamProxyManager = streamproxy.NewStreamProxy(&streamproxy.Options{
Database: sysdb,
streamProxyManager, err = streamproxy.NewStreamProxy(&streamproxy.Options{
AccessControlHandler: accessController.DefaultAccessRule.AllowConnectionAccess,
ConfigStore: "./conf/streamproxy",
Logger: SystemWideLogger,
})
if err != nil {
panic(err)
}
//Create WoL MAC storage table
sysdb.NewTable("wolmac")