Jump to content
Sign in to follow this  

How create a PROXY in AutoIt ?

Recommended Posts


Want to write a proxy for a game. I change my game ip-to-connect to my own ( and game connects to my server. The server on PC is exacly like "mediator / middleman ". It connects to the REAL game server. And game sends packets to my "pseudo-server" , then the proxy recevies it and sends to real game server, and from the other way, all packets from real server must go through/over mine proxy.

The good thing of this i s that, i can edit packets before sending them to real server, and before sending to game.

Game --> Proxy --> Game Serv

Game Serv --> Proxy --> Game

Is here anyone who can write a EXAMPLE script for me?

Share this post

Link to post
Share on other sites

Here's my code, but it doesn't work as it should - don't know why.


$Socket = TCPConnect("", 8080);connects to game serv
If $Socket = -1 Then Exit

$Listen = TCPListen("", 8080, 100);waits for connection on my PC
If $Listen = -1 Then Exit
Global $ConnectedSocket = -1
$RogueSocket = -1

While 1
If $RogueSocket > 0 Then
$Recv = TCPRecv($RogueSocket, 2048)
    If Not @error Then TCPCloseSocket($RogueSocket)
        $RogueSocket = -1

If $ConnectedSocket = -1 Then
    $ConnectedSocket = TCPAccept($Listen)
    TrayTip("", "Client Connected", 0, 16)
    $RogueSocket = TCPAccept($Listen)
    $Client = TCPRecv($Socket, 2048)
    If $Client <> "" Then
        TCPSend($ConnectedSocket, $Client)
        GLobal $Client = ""
    $Recv = TCPRecv($ConnectedSocket, 2048)
    If $Recv <> "" Then
        TCPSend($Socket, $Recv)
    ElseIf @error Then
        TrayTip("", "Client Disconnected", 0, 16)
    $ConnectedSocket = -1

Func OnAutoItExit()
    If $ConnectedSocket > -1 Then TCPCloseSocket($ConnectedSocket)
    If $Listen > -1 Then TCPCloseSocket($Listen)
Edited by rysiora

Share this post

Link to post
Share on other sites

Can I ask a question: are you trying to get around gamespy's ads?

No. Just a packet-based MMORPG bot.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.