func Check(serviceName *server.Option) (server.Parser, error) { if !serviceName.Is("transport") { return nil, server.ServiceNotFound() } if !transportOption.Is(transportName) { return nil, server.TransportNotFound() } st := Socks5Transport{ Name: serviceName.Get(), Transport: transportOption.Get(), } return st, nil }
func Check(serviceName *server.Option) (server.Parser, error) { if !serviceName.Is("transport") { return nil, server.ServiceNotFound() } transportName := transportOption.Get() if !transportNames[transportName] { return nil, server.TransportNotFound() } st := TorPTTransport{ Name: transportName, } return st, nil }