proxy: added PackerServer interface

This commit is contained in:
nadoo committed 2022-01-16 23:15:18 +08:00
1 parent 253e5008c4
commit cf1a4e3817
11 files changed
+52 -22

No files matched your search

+5
View File
@@ -16,6 +16,11 @@ import (
"github.com/nadoo/glider/proxy"
)
func init() {
proxy.RegisterServer("trojan", NewTrojanServer)
proxy.RegisterServer("trojanc", NewClearTextServer) // cleartext
}
// NewClearTextServer returns a trojan cleartext proxy server.
func NewClearTextServer(s string, p proxy.Proxy) (proxy.Server, error) {
t, err := NewTrojan(s, nil, p)