After a few days of use Mtproto To use for the telegram, somehow I feel that the connection is quite slow, still on that VPS and transferred to create socks5 on Ubuntu, receiving the news as smoothly like Sunsilk. For those who do not know, Socket5 is a Proxy protocol that helps users hide IP, cross firewalls and access blocked services such as telegram, foreign web or high security applications. Instead of using a risky public proxy, you absolutely can create a Socks5 proxy on your own server for safer, more stable and effective use.
Join the channel Telegram belong to Anonyviet 👉 Link 👈 |
This article will guide how to create socks5 on Ubuntu and how to use it for telegram or any applications that support proxy.
What is Socket5?
Socks5 is the latest version of the Socket protocol, operating on the 5th floor of the OSI model. Socks5 allows data transfer from the customer to the server via intermediate proxy, supports many protocols such as HTTP, HTTPS, FTP, Torrent … and is not binding on the transmission content.
Guide to self -creation socket5 on Ubuntu
To create a separate creation of Socket5 on Ubuntu using Fake IP, follow these steps:
Step 1: On the Ubuntu server, type the command:
sudo apt update sudo apt install dante-server -y
Step 2: Check what is the network card name of the server. You type the command: ip a
The current network network test may be esns3
, enp0s3
, eth0
…. Remember the network card name to configure Socket.
As shown below is the VPS I am using Interface ETH0
Step 3: Edit or create files /etc/danted.conf:
Type command: sudo nano /etc/danted.conf
Paste the content below is in danced.conf (instead of ETH0 into interface in step 2):
logoutput: syslog internal: eth0 port = 1080 external: eth0 socksmethod: none clientmethod: none user.notprivileged: nobody client pass { from: 0.0.0.0/0 to: 0.0.0.0/0 log: connect disconnect error } socks pass { from: 0.0.0.0/0 to: 0.0.0.0/0 protocol: tcp udp socksmethod: none log: connect disconnect error }
Then press the keys below to save and exit the file:
Ctrl X Y Enter
Step 4: Perform the connection port
If you are using IPTables, use the command:
sudo iptables -A INPUT -p tcp --dport 1080 -j ACCEPT
If using UFW, use the command
sudo ufw allow 1080/tcp
sudo ufw reload
If using Firewallld, use the command:
sudo firewall-cmd --permanent --add-port=1080/tcp
sudo firewall-cmd --reload
If you are not sure that VPS you are using any Firewall, just copy all the commands to run.
Step 5: Start Dante to run Socket5
sudo systemctl restart danted sudo systemctl enable danted sudo systemctl status danted
With this command, when restarting the VPS or escaping from SSH, Danted still works underground, you do not need to use Screen as Mtproto Proxy.
To check the Ubuntu VPS has listened to the 1080 port yet, you type the command
sudo ss -tuln | grep 1080
If you see listen, it’s ok.
How to use socket5 for telegram
Create socket5 links to share with everyone
Telegram supports additional automatic proxies through links tg://
or https://t.me/proxy?server=x.x.x.x&port=xxx
You only need to enter IP VPS and Port 1080 and click on the link, the socket5 will add to the telegram and use the IP VPS to connect, then it will be stopped by the network.
For example, IP server is 51.79.123.222, you access the link
tg://proxy?server=51.79.123.222&port=1080
or
https://t.me/proxy?server=51.79.123.222&port=1080
Add craft socket5 to Telegram
If you add a manual socks5 to the Telegram, go to Setting -> Advance -> Connection Type: See where Use Custom Proxy -> Add Proxy. If you see the result of online is successfully connected from your telegram to your proxy.
Enter hostname and port in:
If you see the online server, you have successfully used socks5 for telegram. On Ubuntun, you can install socks5 while installing MTPro.
In addition to using Socket5 for Telegram, you can use for the web browser or the entire computer by changing the Proxy configuration to your IP and port VPS, if you do not know how to do the comment below for me to write more content.