Install Ammyy Router on Linux (CentOS)

# creating folder for router 
mkdir /var/router.1
cd /var/router.1

# download router, you can find link here http://rl.ammyy.com/user/
wget www.ammyy.com/…
chmod +x ammyy_router

# create config file and edit it
./ammyy_router -createconfig
vim config.txt

# run router as console
./ammyy_router –console

# or run router as deamon
./ammyy_router –daemon

# to set autorun, edit /etc/rc.local, add next lines to the end of file
echo 6 > /proc/sys/net/ipv4/tcp_retries2

/var/router.1/ammyy_router –daemon

# or
setsid /var/router.1/ammyy_router -console -nostdin > /var/router.1/out.log 2>&1 &

Note:
# On x64 system you can get error when run ammyy_router, to fix them you need
yum install glibc.i686
yum install libstdc++.i686

Install Ammyy Router on Windows

1.	Be sure that for private router you need to have dedicated external ip address (or correct port forwarding from external IP) and ports 80,443,8080 are free on this ip.
2.	Download the router exe file and save it to local disk on target computer
3.	Create config file and edit it
-	Run “AmmyyRouter.exe –createconfig” after open “config.txt” located in the same folder as exe file
-	Find the line starting with “password_console:” and type your password instead of default one. It’ll be used for to accessing router by Web
-	Set ports and ip (optional).
Make sure that “config.txt” contains valid ip and ports. 
1) For example if this Router is supposed to listen   80,443 and 8080 ports the config file should contain this record
	ports: 80,443,8080
(for correct working you need to leave these 3  ports, but you can add more ports here)
2) If you need to listen TCP ports at ALL IPs of your host, please leave default value “ip: 0.0.0.0”, 
but if you need only at a specific IP (it should belong to the host on which the router is running).
 you need put it in ip, for example: “ip: 209.162.202.200”
4.	Install the router as a service and start it.
-	Run application “AmmyyRouter.exe”
-	Open menu “Service” and click on ”Install”
-	Open menu “Service”and click on “Start”
5.	Check errors.
Check that no log files located in the same folder as exe file. If you found log file, please open it, it can contain error description.

Parameters of config.txt file

Parameter	Meanings	
ports	The list of ports which router listen, for example “80,443,8080”	
port_console	Port for http console, for example “82”	
max_sockets	Maximum of tcp connections, for example “30000”	
ip	IP address which router listen, by default ‘0.0.0.0’ means listen all IP addresses	
nagle	Can be ‘on’ or ‘off’ for turn on or off TCP Nagle algorithm	
password_console	Password used by access router by http console	
password_using	Password for Ammyy Admin. If this parameter is set you should set this password to Ammyy Admin in the settings of private router	
allow_ids	The list of Ammyy IDs separated by ‘,’. If this parameter is set only these Ids can use this router.	

Monitoring Ammyy Router activity and managing it by http console

-	Open web browser on local or remote computer
-	Open the url on it. This url should look like http://ip-address of the router : one of the ports listed in “config.txt”. For example, http://127.0.0.1:8080 (for local computer)
-	Enter the password (from config.txt file)
-	The following statistics is available for monitoring:
Parameter	Meanings	
Total connections:	The total number of opened TCP connections	
- target:	- number of clients	
- viewer:	- number of operators	
- control:	- number of web browser sessions registered on the router	
- unknown:	- number of connections with unknown intentions, either to use or to manage the router	
Sessions:	Number of pairs	
Max recv:		
Max sent:		
Bytes recv:	Number of bytes received by the router	
Bytes sent:	Number of bytes sent by the router	
Speed recv:	The current speed (for incoming stream) in bits/sec	
Speed sent:	The current speed (for outgoing stream) in bits/sec	

Also you may see per-connection statistics. For this you need to press “Refresh” button and choose the appropriate connection in the combobox. After that you can see an updated statistics below it:
Parameter	Meanings	
Bytes recv		
Recv Packets		
Send Packets		
Max Recv Packet Size		
Max Send Packet Size		
Max Queue Size		
Queue Size		

-	The parameters mentioned below can be changed:
Parameter	Meanings	
Stat with control connections	Default value is “YES”. It means that contol management’s connections don’t participate in statistics calculation.	
TCP Nagle	Default value is “NO”. Turns off/on Nagle algorithm. It’s not recommended to have it changed from the default value because of chances of a performance hit.	
Debug log	Default value is “NO”.	

All changes become effective immediately after their change in the web browser.

Using Ammyy Private Router with Ammyy Admin

On a Client computer:
Click menu “Ammyy” -> “Settings” and choose “Network” tab
Set Private Router
1) if router on other computer - "x.x.x.x:443,80,8080", where x.x.x.x - external IP address of your private router (example 91.1.2.103:443,80,8080)
2) if router on the same computer - "127.0.0.1:443,80,8080"

On an Operator computer:
Click menu “Ammyy” -> “Settings” and choose “Network” tab
1) if router on other computer - no need to change default settings
2) if router on the same computer, change settings
- Set Private Router "127.0.0.1:443,80,8080"
- Clear check-box "Request a client's router" (into “Common” tab)