예제 #1
0
파일: socks5.go 프로젝트: thomasf/alkasir
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
}
예제 #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
}