static void Main() { var from = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 30001); var destination = new IPEndPoint(IPAddress.Parse("125.39.187.84"), 30000); TcpForwarderSlim Listener = new TcpForwarderSlim(); Console.WriteLine("Server listening on port 30001. Press enter to exit."); Listener.Start(from, destination); Console.ReadLine(); }
public static void Main(string[] args) { var ipAddress = "10.208.162.96"; var ipAddress2 = "10.208.162.110"; var port_in = 3333; var port_out = 3333; var tcpForwarder = new TcpForwarderSlim(); tcpForwarder.Start( new IPEndPoint(IPAddress.Parse(ipAddress), port_in), new IPEndPoint(IPAddress.Parse(ipAddress2), port_out)); }
public MainWindow() { InitializeComponent(); TcpForwarderSlim forwarderSlim = new TcpForwarderSlim(); TcpForwarderSlim.SyncSocket = SyncSockets; TcpForwarderSlim.UpdateRequest = UpdateRequest; new Thread(() => { forwarderSlim.Start(new IPEndPoint(IPAddress.Any, 8090), new IPEndPoint(IPAddress.Parse("10.30.138.135"), 8090)); }).Start(); }