Unreal Tournament > Tutorials
UT Proxy Server
Xecutioner:
Haven't done much with this one and the proxy it's self is not my code, I've just adapted it and added optional logging. It can be used as a base to modify or log packets in any game really.
The packets sent are ridiculous and there is very little information on how they work. Basically each packet has multiple sets of data inside to decrease the size of the packets sent.
--- Code: ---using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.Net.Sockets;
using System.IO;
namespace proxy
{
class Program
{
public static IPEndPoint m_listenEp = null;
public static EndPoint m_connectedClientEp = null;
public static IPEndPoint m_sendEp = null;
public static Socket m_UdpListenSocket = null;
public static Socket m_UdpSendSocket = null;
static void Main(string[] args)
{
Listen("IP GOES HERE", 6667, true);
}
static void Listen(string IP, int Port, bool Log = false)
{
StreamWriter sw = null;
if (Log)
{
sw = new StreamWriter(@"C:\UT.txt");
sw.AutoFlush = true;
}
// Creates Listener UDP Server
m_listenEp = new IPEndPoint(IPAddress.Any, Port);
m_UdpListenSocket = new Socket(m_listenEp.Address.AddressFamily, SocketType.Dgram, ProtocolType.Udp);
m_UdpListenSocket.Bind(m_listenEp);
//Connect to zone IP EndPoint
m_sendEp = new System.Net.IPEndPoint(IPAddress.Parse(IP), Port);
m_connectedClientEp = new System.Net.IPEndPoint(IPAddress.Any, Port);
byte[] data = new byte[1024];
while (true)
{
if (m_UdpListenSocket.Available > 0)
{
int size = m_UdpListenSocket.ReceiveFrom(data, ref m_connectedClientEp); //client to listener
if (m_UdpSendSocket == null)
{
// Connect to UDP Game Server.
m_UdpSendSocket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
}
m_UdpSendSocket.SendTo(data, size, SocketFlags.None, m_sendEp); //listener to server.
if (Log)
{
sw.WriteLine("");
foreach (var b in data)
{
sw.Write(b + ",");
}
sw.WriteLine("");
}
}
if (m_UdpSendSocket != null && m_UdpSendSocket.Available > 0)
{
int size = m_UdpSendSocket.Receive(data); //server to client.
m_UdpListenSocket.SendTo(data, size, SocketFlags.None, m_connectedClientEp); //listner
if (Log)
{
sw.WriteLine("");
foreach (var b in data)
{
sw.Write(b+",");
}
sw.WriteLine("");
}
}
}
}
}
}
--- End code ---
szaak:
Can you explain what is it used for ?
aloha123:
Hmm is that for ddosing servers, or i didnt get it right?
Andy:
--- Quote ---Hmm is that for ddosing servers, or i didnt get it right?
--- End quote ---
I think this is a simply connect to a proxy to change IP to have a species as anti ban, I have not read the source code but from the title i conclude that serve for this....
^Skillz^20Hz:
--- Quote from: Q-KROWNA on May 21, 2015, 12:46:46 PM ---I think this is a simply connect to a proxy to change IP to have a species as anti ban, I have not read the source code but from the title i conclude that serve for this....
--- End quote ---
dude, 5 year old here!
Navigation
[0] Message Index
[#] Next page
Go to full version