Add PacketProxy debug tool for developers

See issues #808 and #195
This commit is contained in:
ORelio 2019-09-23 23:09:00 +02:00
parent aaf1e8311b
commit e1a041799b
19 changed files with 9599 additions and 0 deletions

View file

@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Sockets;
using System.Net;
using MinecraftClient.Protocol.Handlers;
namespace MinecraftClientProxy
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Waiting for client on port 25565...");
TcpListener listener = new TcpListener(IPAddress.Any, 25565);
listener.Start();
TcpClient client = listener.AcceptTcpClient();
Console.WriteLine("Connecting to server on port 25566...");
TcpClient server = new TcpClient("localhost", 25566);
Console.WriteLine("Starting proxy...\n");
new PacketProxy(client, server).Run();
Console.ReadLine();
}
}
}