Ejemplo n.º 1
0
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
}
Ejemplo n.º 2
0
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
}