tcplink 0.1 free forwarding proxy for Windows 95 or Windows NT. - Using a remote web proxy server gives WWW access to all your LAN. - Almost no system resources required if used with few clients. - Almost no hard-disk space required. - Good performance. - No installation. Only tcplink.exe required to work. - Source code available. - It's free! Although similar in appearance to a DOS application, tcplink is a full 32-bit application that uses multiple thread of execution. As such it requires the thread services of Windows 95 or Windows NT. It will not run under Windows 3.1 or Windows for Workgroup, even with the Win32s extensions. Tcplink is Freeware. If you find tcplink useful, I'd like to know where and how You use it, so as to continue improving it and adding features. Please kindly note, however, that tcplink and relative documentation, also because of the various hardware and software environments into which may be put, is provided <> with absolutely no warranty of any type (read the chapter <> at the bottom of this file). HOW IT WORKS : -------------- Tcplink is very simple. It listen on port 8080 waiting for a TCP connection. When it gets one, it connects to a server (which can be specified on the command line) and forward all the data coming from one connection to the other. This can be useful to let a client connect to a server which cannot be seen directly, as in the case of a private ethernet network who also has a dial-up Internet connection: +----------+ +----------+ ~~~~~~ | | | | ~ ~ | PC 2 | | PC 1 | phone line ~ ~ | | | |.............~ Internet ~ | | | | ^ ~ ~ +----------+ +----------+ | ~ ~ || ethernet || | ~~~~~~~ ::=======================================:: | ^ ^ | | | dynamically assigned IP | | | 192.168.1.1 192.168.1.2 TCPLINK SET UP FOR WWW ACCESS TO A LAN WITH ONLY A DIAL-UP ACCOUNT ------------------------------------------------------------------ You can use tcplink with any service which uses TCP, but the most common use is to connect a http proxy server, giving all computers full web browsing capabilities. For this to work you need: * Access to a http proxy server from the computer with the dial-up connection. Your Internet Access Provider should be able to give you the address and port number of the best proxy server you can use (if not, choose a better provider!). An introduction to the proxy servers can be found at the URL: http://www.lsu.edu/internet/guides/www-docs/WWW/Proxies/ * A full 32 bits TCP/IP protocol stack capable of work on the ethernet and the dial-up connection simultaneously (NT and Windows 95 built-in protocols do, and works well). Please refer to Windows NT/95 documentation to set up TCP/IP properly. * Windows NT or Windows 95 running on the computer connected to the Internet. The other computers can be running any operating system you like. * A Web browser with proxy support (most do). * tcplink running on the computer with the dial-up connection. Assuming the proxy server is proxy.some-provider.net port nnnn, and the computer with the dial-up connection is called PC1, installation is as follows: 1) From PC1 dial-up to the Internet and be sure all is working (for example connecting to some web site or using ping). 2) from PC1 ping PC2 (or another computer on your private network), then from PC2 ping PC1. 4) from PC1 ping proxy.some-provider.net 5) set-up your web browser on PC1 to use the proxy server you like. Follow the instructions given with the browser. For example in Netscape 2.02 just put proxy address and port in the dialogue box available selecting: Options | Network preferences | Proxies | View. Then click on OK, select Manual Proxy Configuration and click OK. 6) On PC1 run tcplink with the following command line: tcplink proxy.some-provider.net nnnn 7) set-up your web browser on the others PC to use PC1 port 8080 as proxy server. 8) Now you should be able to browse the Internet just from any computer. Now when you want to browse the Internet from any computer you only need to connect to the Internet from PC1 and run tcplink. You can choose to use a batch file to dial the Internet and start tcplink. For example I use a file like this on both NT and 95: @echo off rasdial my-provider start /m tcplink proxy.my-provider.net 8080 NOTES : ------ tcplink use multiple threads of executions to support more than one connection at a time, with no built-in limit on the number of connections. If used at home, to give Internet access to one or two other computers through a 28.800 modem, it should work smoothly, without consuming too much resources. However it is not the best solution for large LANs and/or to support medium to high speed links (more than 64Kbps). If this is your case, consider to use, if not a real router (which is the best solution if availability and reduced support cost is a concern), at least a dedicated computer running some sort of firewalling software (for example I used successfully linux 1.3 from slackware 3.0, compiled with the IP_MASQUERADE option). KNOWN BUGS : ------------ Closing the window directly doesn't work in Windows 95 (it works in NT however). To quit in windows 95 open tcplink window, type Q and then press the return key. Some warning and/or error messages may compare on the tcplink window, usually without consequences. If in doubt close tcplink and restart it. SUPPORT : --------- There is no guaranteed support for tcplink. If you really have problems with it You can try to e-mail me at the address below (see <>), provided you have checked the problems are not due to other software components, such as the operating system, or the browser, or the TCP/IP protocol stack. SOURCE CODE : ------------- Source code is provided as an example of winsock programming. The structure of the code is very simple. However, as the source code is the result of much cut and paste, please do not take it as an example of my typical coding! HISTORY : --------- At home I have two computers, connected with an ethernet LAN. I use either linux and windows 95. Running linux on a computer I was able to connect to the Internet from the two computers, not so with windows 95. I like linux very much, nevertheless I found myself and my wife using windows 95 most of the time. To have at least web access from both computers all the time I firs searched some IP_MASQUERADE-like software for windows 95. I do not found nothing working well enough, so I started looking for an http proxy solution. At that time I did not found a web server with a built-in proxy for the windows environment neither, so I began considering writing it myself. As I have no much time to spend, in about an hour I had tcplink which really uses someone else proxy (this is true software reuse!). I then used tcplink in other situations in which it proved very handy. Now a friend convinced me to write this short notes and download all the stuff, so here it is. FUTURE ENHANCEMENTS : -------------------- I do not have much time to work on tcplink, however I'd like to make it a real caching proxy. I think that proxy servers will be of widespread use in the future, especially with the advent of new protocols such as http-ng and ipv6, so I'd like to write one myself. HOW TO CONTACT THE AUTHOR : --------------------------- Alessandro Mordacci can be reached at the following Address: a.mordacci@comune.livorno.it COPYRIGHT & WARRANTY : ---------------------- THE SOFTWARE AND DOCUMENTATION IS PROVIDED AS IS : YOU USE THIS SOFTWARE AT YOU OWN RISK. You can send comments and wish-lists to a.mordacci@comune.livorno.it, however THERE IS NO WARRANTY AND NO SUPPORT IN ANY FORM WILL BE ENTERTAINED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the name of the Author or his company may not be used in any advertising or publicity relating to the software without the specific, prior written permission of the Author.