ConsultingJoe Posted July 12, 2006 Share Posted July 12, 2006 can you make this an actual proxy that you can use like The Proxomitron? or similer? Im looking for some code that can be used as a transperent proxy that sits on your computer and hooks requests for sertin webpages.well, If I could get this to work online then yes. Is it possible?I know there was a webserver built from this that I assume can go through WANany one???I did port forwarding and still nothing? Check out ConsultingJoe.com Link to comment Share on other sites More sharing options...
eltorro Posted July 13, 2006 Share Posted July 13, 2006 well, If I could get this to work online then yes. Is it possible?I know there was a webserver built from this that I assume can go through WANany one???I did port forwarding and still nothing?@zerocool60544I got this script working as a proxy server( whitelist at the moment). There is still some work needed to be done on the transfer side as the INetGet function doesn't always get the graphics or js. Anyway, I need to see if it can be accessed outside of my lan. If your interested, pm me and we'll give it a try.eltorro Regards, [indent]ElTorro[/indent][font="Book"] Decide, Commit, Achieve[/font]_ConfigIO.au3Language Translation --uses Google(tm) MsgBox Move XML wrapper UDF XML2TreeView Zip functionality Split your GUI Save Print ScreenZipPluginEdit In Place listviewSome of my scripts on Google code Link to comment Share on other sites More sharing options...
eltorro Posted July 14, 2006 Share Posted July 14, 2006 Here's erifash's script set up to be a very simple proxy server (ment to be a filter). Just a proof of concept. It is setup as a whitelist server but is very easily set up as a blacklist server. There is some comments in the script, Please read them. AutoItWebProxy.zip Regards, [indent]ElTorro[/indent][font="Book"] Decide, Commit, Achieve[/font]_ConfigIO.au3Language Translation --uses Google(tm) MsgBox Move XML wrapper UDF XML2TreeView Zip functionality Split your GUI Save Print ScreenZipPluginEdit In Place listviewSome of my scripts on Google code Link to comment Share on other sites More sharing options...
erifash Posted July 15, 2006 Author Share Posted July 15, 2006 (edited) Yeah... I have pretty much abandoned this at the moment, as there are different programs out there based off this idea. Check out nfwu's web server if you need a great example! Edited July 15, 2006 by erifash My UDFs:_FilePrint() | _ProcessGetName() | _Degree() and _Radian()My Scripts:Drive Lock - Computer Lock Using a Flash DriveAU3Chat - Simple Multiuser TCP ChatroomStringChunk - Split a String Into Equal PartsAutoProxy - Custom Webserver Link to comment Share on other sites More sharing options...
NELyon Posted July 15, 2006 Share Posted July 15, 2006 i can't get any type of webserver at all to work on my pc. If it's made in autoit or anything else. I am guessing it's because i'm hooked up to a router in my parents room Link to comment Share on other sites More sharing options...
ConsultingJoe Posted July 15, 2006 Share Posted July 15, 2006 i can't get any type of webserver at all to work on my pc. If it's made in autoit or anything else. I am guessing it's because i'm hooked up to a router in my parents room have you tried to access the router to do port forwarding via 192..168.1.1 with user as admin and password as admin?try it Check out ConsultingJoe.com Link to comment Share on other sites More sharing options...
eltorro Posted July 15, 2006 Share Posted July 15, 2006 (edited) @codemysterThat doesn't matter as long as the router is forwarding the port your server is listening on to your computer's network ip.Typically the ip's behind the router are either 192.168.0.x or 192.168.1.x depending on the router.Say your computer ip is 192.168.0.4. Then you are going to want the server to listen on 192.168.0.4. Web servers typically use port 80. So in your router confiuration you want to forward port 80 to 192.168.0.4. It is better to make sure your computer server always has the same address by setting it to a static (non-changing address) in control panel. Just make sure that the address you use for a static address matches the address you configure the router to forward to.If you need help setting this up pm me and let's see if we can get it going.@erifash Thank you for the reply, I am aware of Wood's web server and I contributed some code months ago to fix a problem with the page rendering with Firefox. I actually used that code to make the proxy first. I came across you code and decided to use it as is was more compact and better suited. Would you like to push this forward? If so contact me. I would be willing.@EveryoneYou can use google to test if your website is accessable from the outside world by using google language tools.Here's how:In the code below, replace YOUR.WEB.SITE with your ip address. paste into your browsers address bar.http://translate.google.com/translate?u=http%3A%2F%2FYOUR.WEB.SITE&langpair=en%7Cen&hl=en&safe=off&ie=UTF-8&oe=UTF-8&prev=%2Flanguage_toolsBe careful of the capital F before the address Regards,eltorroEdit: Added google translation tip. Edited July 15, 2006 by eltorro Regards, [indent]ElTorro[/indent][font="Book"] Decide, Commit, Achieve[/font]_ConfigIO.au3Language Translation --uses Google(tm) MsgBox Move XML wrapper UDF XML2TreeView Zip functionality Split your GUI Save Print ScreenZipPluginEdit In Place listviewSome of my scripts on Google code Link to comment Share on other sites More sharing options...
erifash Posted July 15, 2006 Author Share Posted July 15, 2006 Would you like to push this forward?Yes. A while ago I made a program called AutoServer but I don't believe I actually released it. It was a large improvement over AutoProxy. After finishing AutoServer I began working on the next step which I called AutoServer Plugin. It allows support for different server-side languages like PHP to be executed by the server. This is the version that I will release now.PHP Setup:Please copy php5ts.dll and php-cgi.exe to the \plugin\php directory of the attached zip archive. In order to obtain these files you must download php-5.1.4-Win32.zip. The two files you need will be right in there for you.There is one flaw with the PHP/Plugin system though. If the executable returns a header the server won't know what to do with it and will just treat it like the MIME type of the file you are viewing.Well, I hope that's it! If anyone could help me figure out the header issue that would be great as I haven't seen the code in a month or two. AutoServer_Plugin.zip My UDFs:_FilePrint() | _ProcessGetName() | _Degree() and _Radian()My Scripts:Drive Lock - Computer Lock Using a Flash DriveAU3Chat - Simple Multiuser TCP ChatroomStringChunk - Split a String Into Equal PartsAutoProxy - Custom Webserver Link to comment Share on other sites More sharing options...
eltorro Posted July 15, 2006 Share Posted July 15, 2006 Yes. A while ago I made a program called AutoServer but I don't believe I actually released it. It was a large improvement over AutoProxy. After finishing AutoServer I began working on the next step which I called AutoServer Plugin. It allows support for different server-side languages like PHP to be executed by the server. This is the version that I will release now.PHP Setup:Please copy php5ts.dll and php-cgi.exe to the \plugin\php directory of the attached zip archive. In order to obtain these files you must download php-5.1.4-Win32.zip. The two files you need will be right in there for you.There is one flaw with the PHP/Plugin system though. If the executable returns a header the server won't know what to do with it and will just treat it like the MIME type of the file you are viewing.Well, I hope that's it! If anyone could help me figure out the header issue that would be great as I haven't seen the code in a month or two. I download the zip and changed the plugin.ini to reflect a previous installation of php 5.0.5 from when I ran a server on this computer before switching the server over to dedicated debian system. I get the phpinfo page. That is good.Do you have a php page that doesn't work I could use to test with? Regards, [indent]ElTorro[/indent][font="Book"] Decide, Commit, Achieve[/font]_ConfigIO.au3Language Translation --uses Google(tm) MsgBox Move XML wrapper UDF XML2TreeView Zip functionality Split your GUI Save Print ScreenZipPluginEdit In Place listviewSome of my scripts on Google code Link to comment Share on other sites More sharing options...
erifash Posted July 15, 2006 Author Share Posted July 15, 2006 Don't you see this at the top of the phpinfo page?X-Powered-By: PHP/5.1.4 Content-type: text/htmlThat is the header not being correctly processed by the server. My UDFs:_FilePrint() | _ProcessGetName() | _Degree() and _Radian()My Scripts:Drive Lock - Computer Lock Using a Flash DriveAU3Chat - Simple Multiuser TCP ChatroomStringChunk - Split a String Into Equal PartsAutoProxy - Custom Webserver Link to comment Share on other sites More sharing options...
webmedic Posted July 17, 2006 Share Posted July 17, 2006 yes in your plugin.ini it should read this [php] cmd=php-cgi.exe -q "%FILE%" that will get rid of that header. Now a better question. If you want ot use this only for loopback on localhost(127.0.0.1) and you are not online if you try to view anything with ie you well get a you are not cennected do you want to connect error box. With the new udf ie.au3 it isw even worse you will not get any error at all it will only freeze the gui untill you kill the process. Is there a way to check if you are working online or offline and if the system is working online then to switch it to online. By the same token to then turn it to offline when you shut it down again? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted July 17, 2006 Moderators Share Posted July 17, 2006 yes in your plugin.ini it should read this [php] cmd=php-cgi.exe -q "%FILE%" that will get rid of that header. Now a better question. If you want ot use this only for loopback on localhost(127.0.0.1) and you are not online if you try to view anything with ie you well get a you are not cennected do you want to connect error box. With the new udf ie.au3 it isw even worse you will not get any error at all it will only freeze the gui untill you kill the process. Is there a way to check if you are working online or offline and if the system is working online then to switch it to online. By the same token to then turn it to offline when you shut it down again?Guess you could always do a simple ping before hand to tell? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Richard Robertson Posted July 17, 2006 Share Posted July 17, 2006 It should work through the internet just fine. Using my own applications (basic http server in C# with sockets) through a router has worked. My local IP is a 192.168.. address while my router has our house's public address. If you went to the house's IP, it would find my computer listening on port 80 and take it. Link to comment Share on other sites More sharing options...
eltorro Posted July 17, 2006 Share Posted July 17, 2006 Don't you see this at the top of the phpinfo page? That is the header not being correctly processed by the server. Sorry for the late reply. Php is echoing that Try using this for cmd in plugin.ini. php-cgi.exe -q "%FILE%" C:\>C:\php\php-cgi.exe -h Usage: php [-q][-h] [-s] [-v] [-i] [-f <file>] php <file> [args...] -a Run interactively -C Do not chdir to the script's directory -c <path>|<file> Look for php.ini file in this directory -n No php.ini file will be used -d foo[=bar] Define INI entry foo with value 'bar' -e Generate extended information for debugger/profiler -f <file> Parse <file>. Implies `-q' -h This help -i PHP information -l Syntax check only (lint) -m Show compiled in modules -q Quiet-mode. Suppress HTTP Header output. -s Display colour syntax highlighted source. -v Version number -w Display source with stripped comments and whitespace. -z <file> Load Zend extension <file>. C:\> There is still further testing to do. Regards, [indent]ElTorro[/indent][font="Book"] Decide, Commit, Achieve[/font]_ConfigIO.au3Language Translation --uses Google(tm) MsgBox Move XML wrapper UDF XML2TreeView Zip functionality Split your GUI Save Print ScreenZipPluginEdit In Place listviewSome of my scripts on Google code Link to comment Share on other sites More sharing options...
webmedic Posted July 17, 2006 Share Posted July 17, 2006 Guess you could always do a simple ping before hand to tell?yes I can do that how do you turn it on automaticly with autoit?Or I should say I have found some scripts to connect lan's and stuff but nothing specificly dealing with when windows thinks you are working offline.Eltorro I already gave that answer above. Link to comment Share on other sites More sharing options...
eltorro Posted July 18, 2006 Share Posted July 18, 2006 I have php working with GET data. It doesn't look like there is a way to use POST data with php_cgi.exe. If someone knows how, please post. The current working code is here: AutoServer.zip Please change the path in plugin.ini for your installation. Eltorro I already gave that answer above. I didn't see that. : Actually I think php-cgi.exe -f "%FILE%" would work too. Regards, [indent]ElTorro[/indent][font="Book"] Decide, Commit, Achieve[/font]_ConfigIO.au3Language Translation --uses Google(tm) MsgBox Move XML wrapper UDF XML2TreeView Zip functionality Split your GUI Save Print ScreenZipPluginEdit In Place listviewSome of my scripts on Google code Link to comment Share on other sites More sharing options...
webmedic Posted July 18, 2006 Share Posted July 18, 2006 yes I'm one of the linux guys that writes cli programs in php. So you always have to suppress the headers for that. It would seem this si the same thing. As far as post data from what I can tell it is an issue with autoit. Set up a log and log all the header data you recieve And you will see that post data is simply not recieved. I was doing this for a while and I was not getting anything at all as far as post data goes. Maybe my logging was not set up correctly but I dont think so. I'll do some further checking to make sure. Link to comment Share on other sites More sharing options...
eltorro Posted July 18, 2006 Share Posted July 18, 2006 (edited) yes I'm one of the linux guys that writes cli programs in php. So you always have to suppress the headers for that. It would seem this si the same thing. As far as post data from what I can tell it is an issue with autoit. Set up a log and log all the header data you recieve And you will see that post data is simply not recieved. I was doing this for a while and I was not getting anything at all as far as post data goes. Maybe my logging was not set up correctly but I dont think so. I'll do some further checking to make sure. As far as post data from what I can tell it is an issue with autoit. Set up a log and log all the header data you recieve And you will see that post data is simply not recieved.I'm not sure what you mean here. the POST data is in the headers as near as I can tell. POST /Test_Page.php HTTP/1.1 Host: 192.168.0.10:65000 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Referer: http://192.168.0.10:65000/Extra_credit.php Content-Type: application/x-www-form-urlencoded Content-Length: 61 firstname=Jose&lastname=Quervo&hours=40&rate=15&submit=Submit I opened a dos box and ran (several) different ways of passing the POST data to php_cgi.exe. I don't know how the interface is supposed to work. If I pass the data to the exe and the page is looking for POST then I don't get the values in the page. If I pass the data to the exe and the page is looking of GET then the page does what it should. I guess the hundred dollar questions are how does php_cgi.exe expect to receive POST data and how does it pass the POST data to the page. Edited July 18, 2006 by eltorro Regards, [indent]ElTorro[/indent][font="Book"] Decide, Commit, Achieve[/font]_ConfigIO.au3Language Translation --uses Google(tm) MsgBox Move XML wrapper UDF XML2TreeView Zip functionality Split your GUI Save Print ScreenZipPluginEdit In Place listviewSome of my scripts on Google code Link to comment Share on other sites More sharing options...
spyrorocks Posted July 18, 2006 Share Posted July 18, 2006 could you convert this into a proxy server? [center] My Projects: Online AutoIt Compiler - AutoForum - AutoGuestbook - AutoIt Web-based Auto Installer - Pure AutoIt Zipping Functions - ConfuseGen - MindReader - P2PChat[/center] Link to comment Share on other sites More sharing options...
nfwu Posted July 18, 2006 Share Posted July 18, 2006 could you convert this into a proxy server?Yes, you can.I opened a dos box and ran (several) different ways of passing the POST data to php_cgi.exe. I don't know how the interface is supposed to work. If I pass the data to the exe and the page is looking for POST then I don't get the values in the page. If I pass the data to the exe and the page is looking of GET then the page does what it should. I guess the hundred dollar questions are how does php_cgi.exe expect to receive POST data and how does it pass the POST data to the pageSearched the PHP documentations and there is nothing useful for webserver developers!!! Oh well, the hard path is here.I have currently stopped work on my own webserver as I am rather busy at the moment. Congratulations with what you have done so far!#) TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now