File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -26,22 +26,18 @@ type cookieAddr struct {
26
26
var remoteForwardRegexTCP = regexp .MustCompile (`^(\d+):(.+):(\d+)$` )
27
27
28
28
// remote_socket_path:local_socket_path (both absolute paths)
29
- var remoteForwardRegexUnixSocket = regexp .MustCompile (`^(\\ .+):(\\ .+)$` )
29
+ var remoteForwardRegexUnixSocket = regexp .MustCompile (`^(\/ .+):(\/ .+)$` )
30
30
31
31
func remoteForwardTCP (flag string ) bool {
32
- reg := remoteForwardRegexTCP .MatchString (flag )
33
- fmt .Println ("remoteForwardTCP" , reg )
34
- return reg
32
+ return remoteForwardRegexTCP .MatchString (flag )
35
33
}
36
34
37
35
func remoteForwardUnixSocket (flag string ) bool {
38
- reg := remoteForwardRegexUnixSocket .MatchString (flag )
39
- fmt .Println ("remoteForwardUnixSocket" , reg )
40
- return reg
36
+ return remoteForwardRegexUnixSocket .MatchString (flag )
41
37
}
42
38
43
39
func validateRemoteForward (flag string ) bool {
44
- return remoteForwardUnixSocket (flag ) || remoteForwardTCP (flag )
40
+ return remoteForwardTCP (flag ) || remoteForwardUnixSocket (flag )
45
41
}
46
42
47
43
func parseRemoteForwardTCP (matches []string ) (net.Addr , net.Addr , error ) {
You can’t perform that action at this time.
0 commit comments