mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-11-07 17:36:07 +00:00
parent
aaf1e8311b
commit
e1a041799b
19 changed files with 9599 additions and 0 deletions
29
DebugTools/MinecraftClientProxy/Program.cs
Normal file
29
DebugTools/MinecraftClientProxy/Program.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue