Skip to content

Instantly share code, notes, and snippets.

@rlex
Last active December 8, 2020 15:53
Show Gist options
  • Save rlex/4056037b8c36f339fbec0da392d05ba9 to your computer and use it in GitHub Desktop.
Save rlex/4056037b8c36f339fbec0da392d05ba9 to your computer and use it in GitHub Desktop.
dante telegram config
#Tested on Debian 9
#Write log
logoutput: syslog /var/log/sockd.log
#Listen IPv4
internal: 1.2.3.4 port = 1080
#Listen IPv6
#internal: Y::Y port = 1080
#External IPv4
external: 1.2.3.4
#External IPv6
#external: Y::Y
#In case of multiple outbound IPs
#external.rotation: same-same
#UNCOMMENT ONE OF AUTH BLOCKS
#No authentication
#clientmethod: none
#socksmethod: none
#Use basic authentication, uses data from system passwd/shadow
#NB: Block this user from SSH daemon since password is transferred plain-text!
#To add user: adduser --home /dev/null --shell /bin/false user1
#socksmethod: username
#user.privileged: root
#user.unprivileged: nobody
#user.libwrap: nobody
#Allow clients from any IPs
client pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
log: error
}
#Only allow telegram subnets (IANA data)
socks pass { from: 0.0.0.0/0 to: 91.108.12.0/22 }
socks pass { from: 0.0.0.0/0 to: 91.108.16.0/22 }
socks pass { from: 0.0.0.0/0 to: 91.108.20.0/22 }
socks pass { from: 0.0.0.0/0 to: 91.108.36.0/23 }
socks pass { from: 0.0.0.0/0 to: 91.108.38.0/23 }
socks pass { from: 0.0.0.0/0 to: 91.108.4.0/22 }
socks pass { from: 0.0.0.0/0 to: 91.108.56.0/22 }
socks pass { from: 0.0.0.0/0 to: 91.108.56.0/23 }
socks pass { from: 0.0.0.0/0 to: 91.108.8.0/22 }
socks pass { from: 0.0.0.0/0 to: 149.154.160.0/20 }
socks pass { from: 0.0.0.0/0 to: 149.154.164.0/22 }
socks pass { from: 0.0.0.0/0 to: 149.154.168.0/22 }
socks pass { from: 0.0.0.0/0 to: 149.154.172.0/22 }
socks pass { from: ::/0 to: 2001:67c:4e8::/48 }
socks pass { from: ::/0 to: 2001:b28:f23c::/48 }
socks pass { from: ::/0 to: 2001:b28:f23d::/48 }
socks pass { from: ::/0 to: 2001:b28:f23f::/48 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment