chore: listeners support shadowsocks/vmess

This commit is contained in:
wwqgtxx
2022-12-05 10:12:53 +08:00
parent 2e22c712af
commit b7d976796a
24 changed files with 453 additions and 125 deletions

View File

@ -0,0 +1,17 @@
package config
import (
"encoding/json"
)
type ShadowsocksServer struct {
Enable bool
Listen string
Password string
Cipher string
}
func (t ShadowsocksServer) String() string {
b, _ := json.Marshal(t)
return string(b)
}

22
listener/config/vmess.go Normal file
View File

@ -0,0 +1,22 @@
package config
import (
"encoding/json"
)
type VmessUser struct {
Username string
UUID string
AlterID int
}
type VmessServer struct {
Enable bool
Listen string
Users []VmessUser
}
func (t VmessServer) String() string {
b, _ := json.Marshal(t)
return string(b)
}