-
Notifications
You must be signed in to change notification settings - Fork 1.4k
/
Copy pathcompat.go
56 lines (50 loc) · 1.51 KB
/
compat.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package chshare
//this file exists to maintain backwards compatibility
import (
"github.com/jpillora/chisel/share/ccrypto"
"github.com/jpillora/chisel/share/cio"
"github.com/jpillora/chisel/share/cnet"
"github.com/jpillora/chisel/share/cos"
"github.com/jpillora/chisel/share/settings"
"github.com/jpillora/chisel/share/tunnel"
)
const (
DetermRandIter = ccrypto.DetermRandIter
)
type (
Config = settings.Config
Remote = settings.Remote
Remotes = settings.Remotes
User = settings.User
Users = settings.Users
UserIndex = settings.UserIndex
HTTPServer = cnet.HTTPServer
ConnStats = cnet.ConnCount
Logger = cio.Logger
TCPProxy = tunnel.Proxy
)
var (
NewDetermRand = ccrypto.NewDetermRand
GenerateKey = ccrypto.GenerateKey
FingerprintKey = ccrypto.FingerprintKey
Pipe = cio.Pipe
NewLoggerFlag = cio.NewLoggerFlag
NewLogger = cio.NewLogger
Stdio = cio.Stdio
DecodeConfig = settings.DecodeConfig
DecodeRemote = settings.DecodeRemote
NewUsers = settings.NewUsers
NewUserIndex = settings.NewUserIndex
UserAllowAll = settings.UserAllowAll
ParseAuth = settings.ParseAuth
NewRWCConn = cnet.NewRWCConn
NewWebSocketConn = cnet.NewWebSocketConn
NewHTTPServer = cnet.NewHTTPServer
GoStats = cos.GoStats
SleepSignal = cos.SleepSignal
NewTCPProxy = tunnel.NewProxy
)
//EncodeConfig old version
func EncodeConfig(c *settings.Config) ([]byte, error) {
return settings.EncodeConfig(*c), nil
}