sh如何在ubuntu16.04/18.04上使用dante(不仅仅)设置socks5代理服务器(代码片段)

author author     2022-12-17     702

关键词:

### NOT A SCRIPT, JUST A REFERENCE!

# install dante-server
sudo apt update
sudo apt install dante-server

# or download latest dante-server deb for Ubuntu, works for 16.04 and 18.04:
wget http://archive.ubuntu.com/ubuntu/pool/universe/d/dante/dante-server_1.4.2+dfsg-2build1_amd64.deb
# or older version:
wget http://ppa.launchpad.net/dajhorn/dante/ubuntu/pool/main/d/dante/dante-server_1.4.1-1_amd64.deb
# and install it:
sudo dpkg -i dante-server_*.deb
# it may fail to start, it's okay, packaged config is garbage

# open dante config for editing:
sudo nano /etc/danted.conf

# remove everything (holding Ctrl+K will do it) and copy-paste basic config:
logoutput: syslog
user.privileged: root
user.unprivileged: nobody
# desired proxy ports may differ, used here: POP3 110, IMAP 143, HTTPS 443
internal: 0.0.0.0 port = 110
internal: 0.0.0.0 port = 143
internal: 0.0.0.0 port = 443
# interface name may differ, use `ip a` command and copy non-lo interface:
external: eth0
# set socksmethod to 'none' instead of 'username' if you want to disable auth.
socksmethod: username
clientmethod: none
user.libwrap: nobody
client pass 
        from: 0/0 to: 0/0
        log: connect disconnect error

socks pass 
        from: 0/0 to: 0/0
        log: connect disconnect error

# end of config

# add system user 'proxyuser' with password to use with sock5 auth:
sudo useradd --shell /usr/sbin/nologin proxyuser
# or:
# sudo adduser --system --no-create-home --disabled-login --group proxyuser
sudo passwd proxyuser
# and input desired password twice

# if you use ubuntu firewall, allow ports:
sudo ufw allow 110
sudo ufw allow 143
sudo ufw allow 443

# restart dante and enable starting on boot:
sudo systemctl restart danted
sudo systemctl enable danted

# you may see dante status:
sudo systemctl status danted

# you may see dante logs (connect disconnect error):
sudo journalctl -xe -u danted
# add -f argument to attach and watch

# test proxy on your local machine:
curl -v -x socks5://proxyuser:password@yourserverip:443 https://www.yandex.ru/

# construct telegram links:
# https://t.me/socks?server=yourserverip&port=443&user=proxyuser&pass=password
# tg://socks?server=yourserverip&port=443&user=proxyuser&pass=password

# used and useful links:
# http://www.inet.no/dante/doc/latest/config/server.html
# http://www.inet.no/dante/doc/latest/config/redundancy.html
# https://www.binarytides.com/setup-dante-socks5-server-on-ubuntu/
# https://krasovsky.me/it/2017/07/socks5-dante/
# https://bitbucket.org/snippets/gudvinr/qd5pA

sh如何在debian/ubuntu上安装phantomjs(代码片段)

查看详情

ubuntu16.04/18.04安装shutter截图工具

....net/226687722/libgoocanvas3_1.0.0-1_amd64.deb3、libgoo-canvas-perl_0.06-2ubuntu3_amd64.deb  http://launchpadlibrarian.net/330848267/libgoo-canvas-perl_0.06-2ubuntu3_ 查看详情

sh如何在debian/ubuntu上安装nginx和googlepagespeed(代码片段)

查看详情

sh如何在debian/ubuntu上安装nginx和googlepagespeed(代码片段)

查看详情

sh如何在新的ubuntu安装上构建比特币(0.13)(代码片段)

查看详情

sh使用php7在ubuntu14.04上安装mongodb(代码片段)

查看详情

如何在 Ubuntu 上安装 Android Studio?

】如何在Ubuntu上安装AndroidStudio?【英文标题】:HowtoinstallAndroidStudioonUbuntu?【发布时间】:2015-04-0313:08:37【问题描述】:我必须在Ubuntu上安装AndroidStudio,我使用thislink下载了AndroidStudio。有什么简单的方法可以在Ubuntu上安装Studio?... 查看详情

sh在ubuntu14.04上使用pyenv安装python2.7.10(代码片段)

查看详情

sh易于安装openresty(在ubuntu14.04,15.10和16.04上使用和测试)(代码片段)

查看详情

ubuntu下怎么打开vivado

...式:tar-zxvf压缩文件名.tar.gz。解压缩之后会得到文件夹,如何启动Vivado呢?toucha.sh创建一个.sh文件对这个文件进行编辑,via.sh,将上述命令写入该文件中。在命令行下面进入到sh文件的目录,执行chmod+xa.sh,在执行./a.sh。这样便可... 查看详情

sh在ubuntu上安装工具(代码片段)

查看详情

sh在ubuntu上更改时区(代码片段)

查看详情

sh在ubuntu14.04上使用rbenv和ruby-build安装ruby2.2.3(代码片段)

查看详情

sh易于安装openresty和nvm(在ubuntu14.04,15.10和16.04上使用和测试)(代码片段)

查看详情

如何在 Linux Ubuntu 中创建 .sh 扩展名文件? [关闭]

】如何在LinuxUbuntu中创建.sh扩展名文件?[关闭]【英文标题】:HowcanIcreate.shextensionfileinLinuxUbuntu?[closed]【发布时间】:2013-10-1719:38:31【问题描述】:我正在尝试编写一个脚本来将我的.jar文件之一作为守护进程运行,但我不明白如... 查看详情

yolov5的ros功能包(代码片段)

...基于PyTorch-YOLOv5的PyTorch-YOLOv5的ROS功能包。该功能包已在Ubuntu16.04和Ubuntu18.04上进行了测试。Authors:ZhitaoZheng(qq44642754@163.com)开发环境:Ubuntu16.04/18.04ROSkinetic/melodicPython>=3.6.0环境,PyTorch>=1.7环境配置安装步骤࿱... 查看详情

sh在ubuntu上安装uuidpeclexension(代码片段)

查看详情

sh在ubuntu上安装自然滚动(代码片段)

查看详情