Setting 3Proxy at home to redirect incoming connections

Recently I wanted to set-up a PC as a web proxy. So client could browse the internet with the server IP address. As a web server software I used a great program 3Proxy.


Hardware setup and IP addresses

PC that runs 3Proxy has internal ip address 192.168.2.3 and connects to the internet via router. This is importang thing, because client can not access proxy server directly. You need to configure your router so client could connect. In my case I set up port mapping from external port 3128 to internal port 8080 and internal ip address 192.168.2.3. That is it. Incoming traffic from port 3128 is redirected to the 192.168.2.3:8080. Take a note of your router external IP address. Clients will use it. Assume, that external ip address is 10.1.2.3.


Proxy setup
internal 192.168.2.3
external 192.168.2.3
# internal and external addresses should be the same
# see http://3proxy.ru/faqe.asp

nserver
nserver
# DNS servers of your ISP

nscache 65536
# DNS cashe

auth none

log
allow *

proxy -p8080 -a
# set up anonymous proxy server to port 8080


Run 3Proxy. After this your can set-up your client's browser to access internet via proxy. Enter 10.1.2.3 (external IP of your router) as proxy address. Enter 3128 as proxy port.
Enjoy!


**** WARNING! **** The presented configuration does not secure your proxy. It should be used only for test purposes. The author is not responsible for how you use information from this post. Use at your own risk.

HOWTO: use LaTeX equations in other software (LaTeX2EPS)

One possible solution to use LaTeX equation in other software is to create an EPS document with your equation.
I will explain how you can do this in Windows.

Let's create TeX file with name equation.tex:
\documentclass{minimal}

\begin{document}
$a = b \div c$
\end{document}

You can use additional packages in this document. As well as commands like \newcommand that could help you to shorten your equation writing.

Now there are two options to proceed.

You can use file dvi2eps.cmd
@echo off
SET USAGE=Usage: dvi2eps.cmd file_to_process
IF "%1" == "" (
 ECHO %USAGE%
 EXIT
)
echo Converting DVI to EPS
dvips -E -o "%~d1%~p1%~n1.eps" "%~dpnx1"

to process single .dvi file in command line. Save this file somewhere within PATH and run
> dvi2eps.cmd equation.dvi

Script creates file equation.eps in the same directory as equation.dvi.

Or you can setup a TeXnicCenter to output EPS files.

  1. Save following text as file with .tco extension:
    <?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
    <txcop:outputProfiles version="1" xmlns:txcop="http://schemas.ToolsCenter.org/TeXnicCenter/OutputProfiles.xsd">
     <outputProfileList>
      <outputProfile name="LaTeX=>DVI=>EPS" stopOnLatexError="false">
       <texCommand execute="true" path="latex.exe" arguments="--src -interaction=nonstopmode "%Wm""/>
       <bibTexCommand execute="false" path="" arguments=""/>
       <makeIndexCommand execute="false" path="" arguments=""/>
       <postProcessors>
        <processor name="DviPs (EPS)" path="dvips.exe" arguments="-E -o "%Bm.eps" "%bm.dvi"" inputFile="" outputFile=""/>
       </postProcessors>
       <viewer path="" closeBeforeCompilation="false">
        <viewProjectCommand type="commandLine">
         <commandLineCommand path="" arguments=""/>
         <ddeCommand path="" server="" topic="System" command=""/>
        </viewProjectCommand>
        <viewCurrentFileCommand type="commandLine">
         <commandLineCommand path="" arguments=""/>
         <ddeCommand path="" server="" topic="System" command=""/>
        </viewCurrentFileCommand>
        <viewCloseCommand type="commandLine">
         <commandLineCommand path="" arguments=""/>
         <ddeCommand path="" server="" topic="System" command=""/>
        </viewCloseCommand>
       </viewer>
      </outputProfile>
     </outputProfileList>
    </txcop:outputProfiles>

  2. Open TeXniCenter editor and go to the menu Build->Define Output Profiles...

  3. Import file that you have created.

  4. Adjust paths for LaTeX and DviPs executables.

Labels