@@ -27,24 +27,12 @@ const (
27
27
loadBalanceLatency
28
28
)
29
29
30
- // allow the same tunnel ports as polipo
31
- var defaultTunnelAllowedPort = []string {
32
- "22" , "80" , "443" , // ssh, http, https
33
- "873" , // rsync
34
- "143" , "220" , "585" , "993" , // imap, imap3, imap4-ssl, imaps
35
- "109" , "110" , "473" , "995" , // pop2, pop3, hybrid-pop, pop3s
36
- "5222" , "5269" , // jabber-client, jabber-server
37
- "2401" , "3690" , "9418" , // cvspserver, svn, git
38
- }
39
-
40
30
type Config struct {
41
31
RcFile string // config file
42
32
LogFile string // path for log file
43
33
JudgeByIP bool
44
34
LoadBalance LoadBalanceMode // select load balance mode
45
35
46
- TunnelAllowedPort map [string ]bool // allowed ports to create tunnel
47
-
48
36
SshServer []string
49
37
50
38
// authenticate client
@@ -88,11 +76,6 @@ func initConfig(rcFile string) {
88
76
config .JudgeByIP = true
89
77
90
78
config .AuthTimeout = 2 * time .Hour
91
-
92
- config .TunnelAllowedPort = make (map [string ]bool )
93
- for _ , port := range defaultTunnelAllowedPort {
94
- config .TunnelAllowedPort [port ] = true
95
- }
96
79
}
97
80
98
81
// Whether command line options specifies listen addr
@@ -370,17 +353,6 @@ func (p configParser) ParseAddrInPAC(val string) {
370
353
}
371
354
}
372
355
373
- func (p configParser ) ParseTunnelAllowedPort (val string ) {
374
- arr := strings .Split (val , "," )
375
- for _ , s := range arr {
376
- s = strings .TrimSpace (s )
377
- if _ , err := strconv .Atoi (s ); err != nil {
378
- Fatal ("tunnel allowed ports" , err )
379
- }
380
- config .TunnelAllowedPort [s ] = true
381
- }
382
- }
383
-
384
356
func (p configParser ) ParseSocksParent (val string ) {
385
357
var pp proxyParser
386
358
pp .ProxySocks5 (val )
0 commit comments