item How to use desproxy to connect to IRC
Suppose you want to connect to IRC using irc.undernet.org port 6667 as your IRC server. First you have to start a system console (see Assumptions above for details) and type
desproxy irc.undernet.org 6667 proxy 8080 1080
That should start desproxy, giving you the copyright notice along with some information. The following is a screen capture from desproxy 0.0.23
-----------------------------------
desproxy 0.0.23
(c) Miguelanxo Otero Salgueiro 2001
This release brought to you patched
by Rutger Nijlunsig.
See RutgerWork.txt in documentation
for details about new features.
Great work guy!
-----------------------------------
TCP port 1080 Binded & Listening
Press ENTER to Quit
Desproxy reports it is listening in local port 1080 ready for a connection.
Open your favourite IRC client (install it first ;D) and connect to 127.0.0.1 port 1080 as your irc server (127.0.0.1 is a virtual IP, always referencing to your local machine). Then, your IRC client should connect to desproxy. It looks like
Connection request from 127.0.0.1, port 1220
Connecting to http proxy (proxy:8080)
Bidirectional connection established
Then you should be able to use your IRC client as if you were directly connected to irc.undernet.org.
How to use desproxy to use other static clients
Let's assume you want to use network application X, which doesn't support HTTP proxies but use one TCP/IP connection (like IRC and SSH). To make X work with desproxy, you just have to 1) Search for the default port of that application 2) Search for the default server of that application and 3) Start desproxy, passing that info as command line parameters. Format is
desproxy remote_host remote_port proxy_host proxy_port local_port
Just give a local_port of your desire, but always over 1023, cause lower ports may need administrator privileges.
About HTTP Authentication
Some HTTP proxies need for security reasons a method of checking client's identity. That's called HTTP authentication (or HTTP authorization).
Despoxy now supports Basic HTTP authentication. If your proxy needs other kind of authentication (either Digest or NTLM) desproxy won't work.
For desproxy to work with a HTTP proxy that needs authentication, you have to tell desproxy which username and password to use. Desproxy reads the environment variable PROXY_USER to get that info.
Suppose your proxy username is "mayka" and your proxy password is "007sgotLTK". Then, before using any of the desproxy programs you should type this in your system console:
set PROXY_USER=mayka:007sgotLTK
Beware passwords can include some characters that should be escaped from the system console. For example, if your password is "moon!=sun", and you are running Linux, you should type
export PROXY_USER=yourusername:moon\!\=sun
Note characters "!" and "=" are escaped using the backslash "\". If you are running MS Windows, as long as I know, you don't have to escape any valid password character.
head1 Troubleshooting
A normal desproxy session looks like this:
$ desproxy 127.0.0.1 21 127.0.0.1 4480 2222
-----------------------------------
desproxy <version>
HTTP/1.1
(c) Miguelanxo Otero Salgueiro 2001
-----------------------------------
Listening on port 2222
Connection request from 127.0.0.1, port 1227
Connecting to http proxy (127.0.0.1:4480)
Bidirectional connection stablished
(127.0.0.1:21) <-> (localhost)
End of connection.
Here, a connection to local ftp server (127.0.0.1:21) is made by using local proxy (127.0.0.1:4480). You can see how, after the connection is accepted, desproxy connected to the proxy, interchanged some bytes (a FTP session) and terminates the connection.
Desproxy is quite self explanatory about errors. Desproxy-inetd is far more obscure, because the way inetd uses it (can't print error messages) to the console.
Basically there are two kind of errors:
- •
-
Errors reported when connecting to the proxy: the http page showing the error is displayed.
- •
-
Every other error: a short error message is displayed.
Some common HTTP errors (as reported by the proxy)
* HTTP 400 Bad Request - Some versions of desproxy (0.0.21) cause
this error (FATAL)
* HTTP 403 Forbidden - Forbidden to do that (FATAL)
* HTTP 404 Not Found - Page not found, or resource not found (MINOR)
* HTTP 405 Method not Allowed - Can't do CONNECT method (FATAL)
* HTTP 500 Internal Server Error - Maybe you're trying to connect to
a remote closed port (remote site reported connection refused)
(MINOR)
* HTTP 503 Service Unavailable -> The proxy can't reach the site
(MINOR)
* HTTP 505 HTTP Version Not Supported - CONNECT method not available
(FATAL)
* HTTP 502 Bad Gateway - Stands for "DNS lookup error" (MINOR)
(FATAL) - Forget about using desproxy, you can't surpass the proxy. (TODO) - To do, not yet implemented. (MINOR) - Temporary fault or maybe your fault.