﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
1465	Proxy functions or udf	e1m1		"Hello, I just got idea for new autoit funcs, (Maybe it can be done as UDF too). Sorry for my bad english, if something here is unclear, PM me.

Make UDF tat allows to create proxy. Proxy funcs would allow other programs to connect trough proxy so that autoit could play with packets.These funcs would enable creating script that could aout answer in msn/irc/skype (or block messages like ""hi, visit me at facebook.com"" it could be also usde to block some games like runescape cuz if u block packet sent to client when u click on logon button then it would be impossible to play that game. it other workds it would make school/library/coffee administrators work easier.

just some ideas about how func could look like.

$sPacket - binary or string
ProxyCreate(RemoteIP,RemotePort[,localIP[,localPort[,DumpPackets]]])
creates proxy so that  app can connect to server trough proxy
dumpckets 0 = no dump, 1 = dump incoming to txt file 2 = dump out going to txt file 3 = dump both incoming and outgoing packets to txt file.

PacketWait(sPacket,iDirection[,iTimeOut])
Should wait until given packet comes but let trough all aother packets so that net app would still work.
it should match packets from beginning so that PacketWait(0x3c) would continue autoit when packets even if packet is 0x3c0.
iDirection  if 0 should wait for incoming packet, and if 1 should wait for outgoing packet.(or it can be also devided onto 2 func)

PacketSend($sPacket,iDirection)
would send packet to client,server or both.

PacketBlock($sPacket,iDirection,iAdd)
This func would block  packets. if iDirection = 0 then would block incoming,  if 1 would block outgoing, and if 2 would block both
if iAdd = 0 then remove packet from block list
if iAdd = 1 then add packet to blocklist.

PacketSetFunc($sPacket,iDirection,$sFunc)
auto call user defined function when given packet appears. Should not  forward package to clinet/server (because we might want edit packet before forwarding it and if we want forward it, we could use other funcs) but it shouldcall UDF giving packet as parameter, iDirection would tell for which direction packets it should act for (wether  it is client --> server or server <-- client)
sFunc would be function name to call 

PacketSetMatch(iMatch)
would set packet match mode
0 would match packet from beginning (0x3c would alsowork if packet is 0x3c01)
1 would match entire packet (if packet is 0x3c01 but we are waiting for 0x3c then it won't react

for any questions PM me.
Thanks for reading.

-- 
let me know waht do you think about it.
e1m1"	Feature Request	closed		AutoIt		None	Rejected	proxy, packets	
