protected bool Equals(RelayEndpoint other) { if (other == null) { return(false); } return(Port == other.Port && string.Equals(ServerName, other.ServerName)); }
public static int RunTunnel(TunnelOptions options) { Console.WriteLine($"Running tunnel to {options.Relay}:{options.RelayPort}"); Console.WriteLine("Open ports: "); foreach (var port in options.Ports) { Console.WriteLine("\t" + port); } var tunnel = new RelayEndpoint(IPAddress.Loopback, options.Relay, options.RelayPort, options.Ports); tunnel.Start(); while (Console.ReadLine() != "q") { ; } return(0); }