-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup_socks5.sh
47 lines (35 loc) · 1.02 KB
/
setup_socks5.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
# Install Dante Server
apt update
apt install -y dante-server
# Backup original config
cp /etc/danted.conf /etc/danted.conf.bak
# Get the active network interface
INTERFACE=$(ip route | grep default | awk '{print $5}')
# Create new Dante config without authentication
echo "logoutput: /var/log/danted.log
user.privileged: root
user.unprivileged: nobody
# The listening network interface or address.
internal: 0.0.0.0 port=1080
# The proxying network interface or address.
external: $INTERFACE
method: none # No authentication
client pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
log: error
}
pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
command: bind connect udpassociate
log: error
method: none # No authentication
}" | sudo tee /etc/danted.conf
# Restart Dante server
systemctl restart danted
# Create log file and set permissions
touch /var/log/danted.log
chmod 644 /var/log/danted.log
# Restart Dante server again
systemctl restart danted
echo "Dante SOCKS5 proxy is set up on port 1080 without authentication."