- Joined
- Oct 18, 2019
- Messages
- 103
- Reaction score
- 28
- Location
- Always on Discord
- Website
- bit.ly
- Achievement
Step 1: you need a good VPS provider that also offers extra IPs (you will need using multiple IPs). 1GB should be enough but it depends on how many simultaneous connections you'll use.
Step 2: I recommend Debian 9 because it's lighter than Ubuntu, and it's very stable, and easy to work with. Everything shown here should also work with Ubuntu, This guide will NOT work for CentOS, Fedora, etc.
Step 3: Attach your additional IPs if you bought any. You can always add IPs later.
Step 4: Login to your VPS with SSH (If you're on windows, you can use puTTY). The VPS provider will give you the username (probably root) and password.
Step 5: Install and Configure tinyproxy as follows:
Make sure you're logged in as root. If not, run
sudo su
Update your system:
apt update && apt upgrade -y
If you have less than 1GB of RAM, you can create a swap file which will be used as RAM if your system runs out. It's the Linux equivalent of the Windows pagefile. This is optional but generally good for performance:
First make sure your VPS does not already have a swap file or partition.
swapon
If this command outputs nothing, you do not have swap space. If it does, you already have swap space and should not need to create more.
Create a 1GB swapfile:
dd if=/dev/zero of=/swapfile bs=1k count=1M
Set correct permissions:
chmod 600 /swapfile
Activate it:
mkswap /swapfile
swapon /swapfile
Then save a line in your fstab, so when you reboot, your system will automatically use that swap space.
echo "/swapfile swap swap defaults 0 0" >> /etc/fstab
Install some packages:
apt install -y git make automake nano build-essential
Download tinyproxy (the following command will always grab the most recent version):
git clone https://github.com/tinyproxy/tinyproxy.git
Then
cd tinyproxy/
./autogen.sh
./configure
nano Makefile
Find the section that starts with "SUBDIRS = \" (it should be line 343)
And remove the line "docs \"
So the section should now look like this:
Code:
SUBDIRS = \
src \
data \
etc \
m4macros \
tests \
scripts
Then press Ctrl x then y then Enter.
(The reason for this edit is that building the documentation for tinyproxy would require downloading and installing 1GB+ of packages, and IMO a lighter system is more important than having these docs.)
make
make install
Configuration:
nano /usr/local/etc/tinyproxy/tinyproxy.conf
And make the following changes:
Code:
Group nobody > Group nogroup
Port 8888 > Port XXXX (Use your choosen port like 8080, 8888, etc. )
#BindSame yes > BindSame yes (this is only needed if you have multiple public IPs)
#LogFile "/usr/local/var/log/tinyproxy/tinyproxy.log" > LogFile "/var/log/tinyproxy.log" (Only if you want to save logs)
Allow 127.0.0.1 > #Allow 127.0.0.1
#BasicAuth user password > BasicAuth ChooseAUsername ChooseAPassword (Use a very strong and complex password, bots from all over the world will be constantly trying to guess it)
ViaProxyName "tinyproxy" > #ViaProxyName "tinyproxy"
#DisableViaHeader Yes > DisableViaHeader Yes (this is technically a wrong thing to do, but we don't want IG/etc. to know that we're using a proxy.)
Press Ctrl x then y then Enter to save and exit.
Your proxy server is now ready! Start it with:
tinyproxy
And to make sure it is running:
ss -lntup | grep tinyproxy
If you get no output, then it is either not running, or running but not binding to a port.
Finally, to make it run automatically after a reboot:
crontab -e
This will open a file in a text editor of your choice, simply add the following line at the end:
And done.Code:@reboot /usr/local/bin/tinyproxy
for Debian 6 and above or Centos 10 burst or above you can use AutoInstaller here
step 1: download the autoinstaller
git clone https://github.com/OwElko/AutoInstall-Config-Tinyproxy.git
step 2 :go to the folder
cd AutoInstall-Config-Tinyproxy
step 3 : lunch the installation and follow instructions
FOR CENTOS6
chmod u+x installcentos6.sh ./installcentos6.sh
For Debian 10 Buster
chmod u+x installdebian10b.sh ./installdebian10b.sh