Giter Site home page Giter Site logo

danted's Introduction

Sockd

Dante socks5 server (v1.3.2/v1.4.2) auto-install and management script

Update

2022/11/26

Upgrade default version for Debian as 1.4.2

2022/12/22

Upgrade default version for Debian as 1.4.3

About

To build a socks5 server, we have lots of open-source programs to reach that, Dante is one of them. I have been using Dante for years and starting to write this auto-install and management script two years ago. This is the second update to match the systemd and new OS release like Debian 8 , CentOS 7.

Comparing with the apt-get or building from source manually, this script will benefit you bellow

  • Auto-recognize, detect the machine's system automatically and compile from source code.
  • Auto-config, check the system's network or read from argument to auto-generate config file.
  • Same-rotation, in multi-ipaddr system. It works like when using different ip address to connect socks5, your external ip address will be different. That's the main reason why I using Dante for years.
  • Multi-authorization, you can configure authorization by pam, system or using whitelist.
  • Docker support [New]
  • Support Dante Latest version 1.4.3 [New]

Install by Docker

Docker Run

# sockd.passwd is a `htpasswd` file contains socks5 auth user/password.
docker run -d \
    --name sockd \
    --publish 2020:2020 \
    --volume sockd.passwd:/home/danted/conf/sockd.passwd \
    lozyme/sockd

Docker Compose

Generate compose

#
# wget https://raw.githubusercontent.com/Lozy/danted/dev/docker/docker-compose.yaml
#
version: '3'

services:

  sockd:
    image: lozyme/sockd
    container_name: sockd
    restart: always
    ports:
      - 2020:2020
    volumes:
      - sockd.passwd:/home/danted/conf/sockd.passwd
      # - sockd.conf:/home/danted/conf/sockd.conf

Run

docker-compose up -d

Check

ss -lnp | grep 2020

User Show/Add/Modify/Delete

You should run bellow to change default password

docker exec sockd script/pam add sockd sockd

more command you could use

[Show]          $docker exec sockd script/pam show
[Add/Modify]    $docker exec sockd script/pam add USER PASSWORD
[Delete]        $docker exec sockd script/pam del USER

Verify

curl https://ifconfig.co --socks5 127.0.0.1:2020 --proxy-user sockd:sockd

Install by Script

wget --no-check-certificate https://raw.github.com/Lozy/danted/master/install.sh -O install.sh
bash install.sh

# run with options: bash install.sh option1 option2
bash install.sh --ip="A.A.A.A:B.B.B.B" --port=2016 --user=sockd --passwd=sockd --whitelist="X.X.X.X/32"
  • if you want to uninstall, using this command
bash install.sh --uninstall
  • if you want to add user
/etc/init.d/sockd adduser USERNAME PASSWORD

Options

Long Option Short Option Value refer description
--ip= ip address list (a.a.a.a:b.b.b.b) *#change ';' to ':' * Socks5 Server Ip address
--port= Default: 2016 port for dante socks5 server
--version= Default: 1.3.2 dante server version, latest is 1.4.3
--user= Pam-Auth Username Socks5 Auth user
--passwd= Pam-Auth Password Socks5 Auth passwd
--whitelist= whitelist ip range (a.a.a.a/32:b.b.b.b/32) Socks5 Auth IP list
--whitelist-url= online white list file (url) Socks Auth whitelist http online
--from-package -p -- Install package from Bin package
--update-whitelist -u -- update white list
--force -f -- force install sockd
--help -h -- print help info

Management

command option description
service sockd start /etc/init.d/sockd start start socks5 server daemon
service sockd stop /etc/init.d/sockd stop stop socks5 server daemon
service sockd restart /etc/init.d/sockd restart restart socks5 server daemon
service sockd reload /etc/init.d/sockd reload reload socks5 server daemon
service sockd status systemd process status
service sockd state /etc/init.d/sockd state running state
service sockd tail /etc/init.d/sockd tail sock log tail
service sockd adduser /etc/init.d/sockd adduser add pam-auth user: service sockd adduser NAME PASSWORD
service sockd deluser /etc/init.d/sockd deluser delete pam-auth user: service sockd deluser NAME

Test Pass

OS release Platform Provider Result
Debian GNU/Linux 8 (jessie) x86_64 vultr pass
Debian GNU/Linux 7 (wheezy) x86_64 vultr pass
Debian GNU/Linux 7 (wheezy) i686 vultr pass
Ubuntu 16.10 (Yakkety Yak) x86_64 vultr pass
Ubuntu 14.04.5 LTS i686 vultr pass
CentOS Linux 7 (Core) x86_64 vultr pass
CentOS Linux 6 x86_64 vultr pass
CentOS Linux 6 i686 vultr pass

danted's People

Contributors

lazygunner avatar lozy avatar ofarukcaki avatar zartek-creole avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

danted's Issues

mirror 404

---> Package pam.x86_64 0:0.99.6.2-14.el5_11 set to be updated
http://mirror.scalabledns.com/centos/5/updates/x86_64/repodata/filelists.sqlite.bz2: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://mirrors.xmission.com/centos/5/updates/x86_64/repodata/filelists.sqlite.bz2: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://mirrors.arsc.edu/centos/5/updates/x86_64/repodata/filelists.sqlite.bz2: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://mirror.metrocast.net/centos/5/updates/x86_64/repodata/filelists.sqlite.bz2: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://mirror.linuxfix.com/centos/5/updates/x86_64/repodata/filelists.sqlite.bz2: [Errno 14] HTTP Error 404: Not Found

关于玩绝地求生的问题

在阿里云上架设成功,用tg测试也没问题。就是在玩绝地求生的时候卡在匹配界面,进不去。udp测试也没啥问题啊!难道还要设置哪里才行?

Auth or Fwall config issue?

Just wanted to start out saying thank you very much for this script,
I am having a bit of an issue actually connecting to the sock5 from my workstation though.
I am running CentOS 7, and have generated this config.

/# Generate by sockd.info
/# Generate interface myexternal
internal: myexternal port = 2016
external: myexternal
socksmethod: username
clientmethod: none
user.privileged: root
user.notprivileged: sockd
logoutput: /var/log/sockd.log
client pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
}
client block {
from: 0.0.0.0/0 to: 0.0.0.0/0
}
pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
protocol: tcp udp
socksmethod: username
log: connect disconnect
}
block {
from: 0.0.0.0/0 to: 0.0.0.0/0
log: connect error
}

The server runs and status shows as running and good to go and all, however (using proxifier to connect) it is refusing to connect saying server refused connection.

+-----------------------------------------+
Dante Server [ Running ]
+-----------------------------------------+
Dante Version: Dante v1.4.2. Copyright (c) 1997 - 2014 Inferno Nettverk A/S, Norway
Socks5 Info:
149.56.251.88:2016
Socks5 User: rhino
+_________________________________________+

I ran iptables -L -n, and here are the results.

`
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
INPUT_direct all -- 0.0.0.0/0 0.0.0.0/0
INPUT_ZONES_SOURCE all -- 0.0.0.0/0 0.0.0.0/0
INPUT_ZONES all -- 0.0.0.0/0 0.0.0.0/0
DROP all -- 0.0.0.0/0 0.0.0.0/0 ctstate INVALID
REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
FORWARD_direct all -- 0.0.0.0/0 0.0.0.0/0
FORWARD_IN_ZONES_SOURCE all -- 0.0.0.0/0 0.0.0.0/0
FORWARD_IN_ZONES all -- 0.0.0.0/0 0.0.0.0/0
FORWARD_OUT_ZONES_SOURCE all -- 0.0.0.0/0 0.0.0.0/0
FORWARD_OUT_ZONES all -- 0.0.0.0/0 0.0.0.0/0
DROP all -- 0.0.0.0/0 0.0.0.0/0 ctstate INVALID
REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
OUTPUT_direct all -- 0.0.0.0/0 0.0.0.0/0

Chain FORWARD_IN_ZONES (1 references)
target prot opt source destination
FWDI_public all -- 0.0.0.0/0 0.0.0.0/0 [goto]
FWDI_public all -- 0.0.0.0/0 0.0.0.0/0 [goto]

Chain FORWARD_IN_ZONES_SOURCE (1 references)
target prot opt source destination

Chain FORWARD_OUT_ZONES (1 references)
target prot opt source destination
FWDO_public all -- 0.0.0.0/0 0.0.0.0/0 [goto]
FWDO_public all -- 0.0.0.0/0 0.0.0.0/0 [goto]

Chain FORWARD_OUT_ZONES_SOURCE (1 references)
target prot opt source destination

Chain FORWARD_direct (1 references)
target prot opt source destination

Chain FWDI_public (2 references)
target prot opt source destination
FWDI_public_log all -- 0.0.0.0/0 0.0.0.0/0
FWDI_public_deny all -- 0.0.0.0/0 0.0.0.0/0
FWDI_public_allow all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0

Chain FWDI_public_allow (1 references)
target prot opt source destination

Chain FWDI_public_deny (1 references)
target prot opt source destination

Chain FWDI_public_log (1 references)
target prot opt source destination

Chain FWDO_public (2 references)
target prot opt source destination
FWDO_public_log all -- 0.0.0.0/0 0.0.0.0/0
FWDO_public_deny all -- 0.0.0.0/0 0.0.0.0/0
FWDO_public_allow all -- 0.0.0.0/0 0.0.0.0/0

Chain FWDO_public_allow (1 references)
target prot opt source destination

Chain FWDO_public_deny (1 references)
target prot opt source destination

Chain FWDO_public_log (1 references)
target prot opt source destination

Chain INPUT_ZONES (1 references)
target prot opt source destination
IN_public all -- 0.0.0.0/0 0.0.0.0/0 [goto]
IN_public all -- 0.0.0.0/0 0.0.0.0/0 [goto]

Chain INPUT_ZONES_SOURCE (1 references)
target prot opt source destination

Chain INPUT_direct (1 references)
target prot opt source destination

Chain IN_public (2 references)
target prot opt source destination
IN_public_log all -- 0.0.0.0/0 0.0.0.0/0
IN_public_deny all -- 0.0.0.0/0 0.0.0.0/0
IN_public_allow all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0

Chain IN_public_allow (1 references)
target prot opt source destination
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 ctstate NEW
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:2016 ctstate NEW

Chain IN_public_deny (1 references)
target prot opt source destination

Chain IN_public_log (1 references)
target prot opt source destination

Chain OUTPUT_direct (1 references)
target prot opt source destination
`

Any idea what might be goin on? Authentication Issue? Firewall?

Issue With Public/Private IP.

Hi, I have the following issue.
If I install this script directly with a VPS server that only has public IP works wonderfully, the password command does not work, but I am not interested.

My problem is in CenturyLink, which provide VPS servers with private IP addresses, and on the private network they assign the public IP.

Example:
Private: 10.100.10.xxx
Audience: 65.151.xxx.xxx

Try both ways and none works for me, is there any way to do this script using the network interface, "eth: 0; ens160"?

Or if there is any solution for me, please say.

Guide for Use With Lede (OpenWRT)

Hello Lozy

Your script is wonderful, thanks for share. but i have trouble with a router with lede, i installed socksify and i try put the "socks.conf" config file into /etc/ but don't works.

this is my script :

errorlog: socks.errlog
logoutput: socks.log
debug: 2

resolveprotocol: tcp

route {
from: 0.0.0.0/0 to: 0.0.0.0/0 via: MyProxyServer port = MyPort
proxyprotocol: socks_v5
method: pam
protocol: tcp
}

ENVIRONMENT
SOCKS_USERNAME: MyUser
SOCKS_PASSWORD: MyPass

I don't know how to use PAM metod, I try with proxifier at windows and works fine, my problem is with Lede.

Thanks for Read.

Sorry for my English, My language is Spanish I'm From Perú.

connection to the proxy server was closed unexpectedly

I installed danted script on Ubuntu 16.04 successfully.
In proxifer :

[01:59] Testing Started.
Proxy Server
Address: 95.216.149.**:2016
Protocol: SOCKS 5
Authentication: YES

[01:59] Starting: Test 1: Connection to the Proxy Server
[01:59] IP Address: 95.216.149.**
[01:59] Connection established
[01:59] Test passed.
[01:59] Starting: Test 2: Connection through the Proxy Server
[02:30] Error : connection to the proxy server was closed unexpectedly.
[02:30] Test failed.
[02:30] Testing Finished.

How can i fixed it?

this is my sockd.conf

internal: 95.216.149.** port = 2016
external: 95.216.149.**

method: pam none
clientmethod: none
user.privileged: root
user.notprivileged: sockd
logoutput: /var/log/sockd.log

client pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
}
client block {
from: 0.0.0.0/0 to: 0.0.0.0/0
}
pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
protocol: tcp udp
method: pam
log: connect disconnect
}
block {
from: 0.0.0.0/0 to: 0.0.0.0/0
log: connect error
}

安装好了但是不能使用

防火墙也关闭了,安装也正常。就是不能连接正常使用。telnet端口也正常。有人说是被墙了但是安装ssr可以正常使用。不知道什么原因。

Short passwords

Hello,
When I was creating a user which can connect to my proxy, I noticed that its password in /etc/danted/sockd.passwd was hashed using CRYPT, which means that only 8 first characters are used. I patched sockd script to use bcrypt but the service refused to start. Consequently, I assumed this is not supported yet.

Is there a way to add bcrypt support?

I can't delete user

[root@test ~]# service sockd deluser test
Clearing User For Dante SOCKS 5 daemon:
/etc/init.d/sockd: line 212: del_user: command not found
[root@test ~]#

Centos 7

After clean install can't connect

After following your instructions and steps to install it it seems to be fine and work well but i cannot connect to the proxy i make, I've also tried adding a different user and still the same all ports are open etc so I have no idea what could cause this and I am quite in need of being able to setup a socks5.

My OS CentOS 7 64bit

Can't proxy https

Hi,
when I query https://steamcommunity.com , then use tcpdump to catch packages I found out that all packages' length field is 0. ( I can see packages are exchanged between steamcommunity.com and my socks server. ) But http://steamcommunity.com works fine. Below is my conf.

internal: 47.88.33.168 port = 2020
external: 47.88.33.168
method: pam none
clientmethod: none
user.privileged: root
user.notprivileged: sockd
logoutput: /var/log/sockd.log
client pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
log: connect disconnect error
}
pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
protocol: tcp udp
#method: pam none
log: connect disconnect error
}
How can I solve this issue? thanks in advance.

install error

bash: line 305: service: command not found
Dante Server Install Failed!
bash: line 331: /etc/init.d/sockd: No such file or directory

please help me

debian - wont install

Executing /usr/sbin/update-rc.d sockd enable
Dante Server Install Failed!

Usage: /etc/init.d/sockd {start|stop|restart|reload|status|state|adduser|deluser|tail|conf|update}

/etc/init.d/sockd tail
==> /var/log/sockd.log <==

nothing in log.. no real info to say why it failed.. This is just crap as its impossible to diagnose without any info.

Add raspbian support

Hi,

first of all thanks for your work.

It seems install.sh does not detect raspbian. I also have run install_debian.sh on my raspberry pi (with raspbian) and systemd unit does not start.

Using

/etc/init.d/sockd start

also does not work. The content of /var/log/sockd.log (the first lines are the systemd start and the last ones are the init.d start

Mar 15 13:59:49 (1489582789.648221) sockd[14910]: error: checkconfig(): no internal address given for server to listen for clients on
Mar 15 13:59:49 (1489582789.648533) sockd[14910]: alert: sockdexit(): terminating
Mar 15 13:59:49 (1489582789.648649) sockd[14910]: warning: sockdexit(): truncate(/var/run/sockd.pid): No such file or directory (errno = 2)
Mar 15 13:59:50 (1489582790.077773) sockd[14935]: error: checkconfig(): no internal address given for server to listen for clients on
Mar 15 13:59:50 (1489582790.078060) sockd[14935]: alert: sockdexit(): terminating
Mar 15 13:59:50 (1489582790.078184) sockd[14935]: warning: sockdexit(): truncate(/var/run/sockd.pid): No such file or directory (errno = 2)
Mar 15 13:59:50 (1489582790.327828) sockd[14938]: error: checkconfig(): no internal address given for server to listen for clients on
Mar 15 13:59:50 (1489582790.328112) sockd[14938]: alert: sockdexit(): terminating
Mar 15 13:59:50 (1489582790.328226) sockd[14938]: warning: sockdexit(): truncate(/var/run/sockd.pid): No such file or directory (errno = 2)
Mar 15 13:59:50 (1489582790.587939) sockd[14941]: error: checkconfig(): no internal address given for server to listen for clients on
Mar 15 13:59:50 (1489582790.588225) sockd[14941]: alert: sockdexit(): terminating
Mar 15 13:59:50 (1489582790.588337) sockd[14941]: warning: sockdexit(): truncate(/var/run/sockd.pid): No such file or directory (errno = 2)
Mar 15 13:59:50 (1489582790.837830) sockd[14944]: error: checkconfig(): no internal address given for server to listen for clients on
Mar 15 13:59:50 (1489582790.838116) sockd[14944]: alert: sockdexit(): terminating
Mar 15 13:59:50 (1489582790.838239) sockd[14944]: warning: sockdexit(): truncate(/var/run/sockd.pid): No such file or directory (errno = 2)
Mar 15 14:10:07 (1489583407.269093) sockd[15974]: error: checkconfig(): no internal address given for server to listen for clients on
Mar 15 14:10:07 (1489583407.269397) sockd[15974]: alert: sockdexit(): terminating

would be possible to add support for raspbian?

Cheers

debian7 x64位无法安装

Restarting Dante SOCKS daemon:
Danted Server [ PID.LOST;Unable ]
cat: /var/run/sockd.pid: No such file or directory
Danted Server [ Stop Done ]
Danted Server [ Start Faild ]
Dante Server Install Failed!

service sockd deluser results in an error

root@host:/home/user# service sockd deluser testuser
Clearing User For Testuser SOCKS 5 daemon:
/etc/init.d/sockd: line 212: del_user: command not found

Deleting an user is not working

如何卸载?

第一遍安装失败,之后安装全部都失败,如何卸载呢?
我的linux上有安装其他程序,无法重做系统

does not work on CentOS 7.5

Hello . Does not work on CentOS 7.5.

The installation went well, but unfortunately the connection is not done.
I turned off the firewall.

I will not get any error, and the connection will start in 10 seconds in the beginning of the service, but then the connection will be cut off.

where is the problem from ?

errno is 11

Hi,

I installed dante using your script, every thing went well, the port is open and is shall work fine,
but I was not able to connect my clients, so I used debug:1 in the .conf file and I see for each request there is some log lines like this:

May 11 13:28:09 (1526029089.605844) sockd[478]: debug: recv_negotiate(): recvmsg() from mother returned -1 after having received 1 packets, errno = 11 (Resource temporarily unavailable)
May 11 13:28:17 (1526029097.613903) sockd[478]: info: block(1): tcp/accept ]: xxx.zzz.xx.zzz.53874 SERVER-IP.7778: negotiation timed out

also I have plenty of resources available (around 1GB free ram), I read somewhere that errno 11 could be result of low memory
somewhere else I read that os being not updated might be the reason, I also updated the server with yum update and it is updated now
I have also changed the .conf file to make sure that auth is not the problem

method: none
clientmethod: none
user.privileged: root
user.unprivileged: nobody
logoutput: /var/log/sockd.log

client pass {
        from: 0.0.0.0/0  to: 0.0.0.0/0
        log: connect disconnect error
}
client block {
        from: 0.0.0.0/0 to: 0.0.0.0/0
}
pass {
        from: 0.0.0.0/0 to: 0.0.0.0/0
        protocol: tcp udp
	command: bind connect udpassociate bindreply udpreply
        method: none
        log: connect disconnect error
}
block {
        from: 0.0.0.0/0 to: 0.0.0.0/0
        log: connect error
}


OS: CentOs 6.9

can you tell me what is my problem

not work :(

Hello!

CentOS 7

My config file:

# Generate by sockd.info
# Generate interface 80.211.*.*
internal: 80.211.*.*  port = 2016
external: 80.211.*.*

method: pam none
clientmethod: none
user.privileged: root
user.notprivileged: sockd
logoutput: /var/log/sockd.log

client pass {
        from: 0.0.0.0/0  to: 0.0.0.0/0
}
client block {
        from: 0.0.0.0/0 to: 0.0.0.0/0
}
pass {
        from: 0.0.0.0/0 to: 0.0.0.0/0
        protocol: tcp udp
        method: none
        log: connect disconnect
}

In Firefox: The proxy server is refusing connections

Danted Server [ PID.LOST;Unable ]

myos:ubuntu 14.04 64位
root@ubuntu:~# service sockd restart
Restarting Dante SOCKS 5 daemon:
Danted Server [ PID.LOST;Unable ]
Danted Server [ Running ]

cat log

Oct 22 22:09:55 (1508681395.999751) sockd[26102]: alert: sockdexit(): terminating
Oct 22 22:10:35 (1508681435.363699) sockd[26176]: info: dante/server[1] v1.3.2 running
Oct 22 22:11:04 (1508681464.872901) sockd[26176]: info: sigterm(): exiting on signal 15
Oct 22 22:11:04 (1508681464.872950) sockd[26176]: alert: sockdexit(): terminating
Oct 22 22:13:26 (1508681606.337942) sockd[26478]: info: dante/server[1] v1.3.2 running
Oct 22 22:14:38 (1508681678.258757) sockd[26478]: info: sigterm(): exiting on signal 15
Oct 22 22:14:38 (1508681678.258805) sockd[26478]: alert: sockdexit(): terminating
Oct 22 22:17:02 (1508681822.855205) sockd[26858]: info: dante/server[1] v1.3.2 running

my install method:
wget --no-check-certificate https://raw.github.com/Lozy/danted/master/install.sh -O install.sh
bash install.sh --port=xx --user=xx --passwd=xx

Restarting Dante SOCKS 5 daemon:
Danted Server [ PID.LOST;Unable ]
Danted Server [ Start Failed ]
Dante Server Install Failed!

then i edit /etc/danted/sockd.conf

internal: myip port = xxx
external: eth0

then
service sockd start
Restarting Dante SOCKS 5 daemon:
Danted Server [ PID.LOST;Unable ]
Danted Server [ Running ]

in fact socks5 work ok just start note:Danted Server [ PID.LOST;Unable ] what main?

centos 6/7 fail

tried both
all throw same error

line 281 ./configure has no permission

so i add bash infront.
then i get error
checking whether the C compiler works... configure: error: cannot run C compiled programs.

they are all newly installed centos. im able to get this to work in ubuntu, but never in centos

help

Dante Server Install Failed in Debian 4.9.110-1 (2018-07-05) x86_64

Aug 5 00:36:26 instance-1 systemd[1]: Starting SOCKS (v4 and v5) proxy daemon (danted)...
Aug 5 00:36:26 instance-1 danted[3160]: Aug 5 00:36:26 (1533429386.294687) danted[3160]: warning: checkconfig(): no socks authentication methods enabled. This means all socks requests will be blocked after negotiation. Perhaps this is not intended?
Aug 5 00:36:26 instance-1 danted[3160]: Aug 5 00:36:26 (1533429386.298646) danted[3160]: error: checkconfig(): no internal address given for server to listen for clients on
Aug 5 00:36:26 instance-1 danted[3160]: Aug 5 00:36:26 (1533429386.299107) danted[3160]: alert: mother[1/1]: shutting down
Aug 5 00:36:26 instance-1 systemd[1]: danted.service: Control process exited, code=exited status=1
Aug 5 00:36:26 instance-1 systemd[1]: Failed to start SOCKS (v4 and v5) proxy daemon (danted).
Aug 5 00:36:26 instance-1 systemd[1]: danted.service: Unit entered failed state.
Aug 5 00:36:26 instance-1 systemd[1]: danted.service: Failed with result 'exit-code'.
Aug 5 00:36:26 instance-1 systemd[1]: Reloading.
Aug 5 00:36:26 instance-1 systemd[1]: apt-daily-upgrade.timer: Adding 9min 50.057080s random time.
Aug 5 00:36:57 instance-1 google-accounts: INFO Removing user ******
Aug 5 00:39:48 instance-1 systemd[1]: Starting SOCKS (v4 and v5) proxy daemon (danted)...
Aug 5 00:39:48 instance-1 danted[3248]: Aug 5 00:39:48 (1533429588.834814) danted[3248]: error: /etc/danted.conf: problem on line 1 near token "n": syntax error. Please see the Dante manual for more information
Aug 5 00:39:48 instance-1 danted[3248]: Aug 5 00:39:48 (1533429588.837124) danted[3248]: alert: mother[1/1]: shutting down
Aug 5 00:39:48 instance-1 systemd[1]: danted.service: Control process exited, code=exited status=1
Aug 5 00:39:48 instance-1 systemd[1]: Failed to start SOCKS (v4 and v5) proxy daemon (dante
d).
Aug 5 00:39:48 instance-1 systemd[1]: danted.service: Unit entered failed state.
Aug 5 00:39:48 instance-1 systemd[1]: danted.service: Failed with result 'exit-code'.
Aug 5 00:40:11 instance-1 systemd[1]: Starting SOCKS (v4 and v5) proxy daemon (danted)...
Aug 5 00:40:11 instance-1 danted[3285]: Aug 5 00:40:11 (1533429611.873731) danted[3285]: e
rror: /etc/danted.conf: problem on line 1 near token "n": syntax error. Please see the Dant
e manual for more information
Aug 5 00:40:11 instance-1 danted[3285]: Aug 5 00:40:11 (1533429611.874503) danted[3285]: a
lert: mother[1/1]: shutting down
Aug 5 00:40:11 instance-1 systemd[1]: danted.service: Control process exited, code=exited s
tatus=1
Aug 5 00:40:11 instance-1 systemd[1]: Failed to start SOCKS (v4 and v5) proxy daemon (dante
d).
Aug 5 00:40:11 instance-1 systemd[1]: danted.service: Unit entered failed state.
Aug 5 00:40:11 instance-1 systemd[1]: danted.service: Failed with result 'exit-code'.
Aug 5 00:52:33 instance-1 systemd[1]: Starting SOCKS (v4 and v5) proxy daemon (danted)...
Aug 5 00:52:33 instance-1 danted[3426]: Aug 5 00:52:33 (1533430353.745696) danted[3426]: e
rror: /etc/danted.conf: problem on line 1 near token "n": syntax error. Please see the Dant
e manual for more information
Aug 5 00:52:33 instance-1 danted[3426]: Aug 5 00:52:33 (1533430353.747895) danted[3426]: a
lert: mother[1/1]: shutting down
Dante Server Install Failed!

在 CentOS 上 不能正常安装

debug log

+ service danted stop
+ rm /etc/danted -rf
+ VERSION=v1.3.2
+ DEFAULT_PORT=2016
+ DEFAULT_USER=danted
+ DEFAULT_PAWD=danted
+ MASTER_IP=ip.baidu.com
++ /sbin/ifconfig
++ grep 'inet addr'
++ grep -Ev 'inet addr:127.0.0|inet addr:192.168.0|inet addr:10.0.0'
++ sed -n 's/.*inet addr:\([^ ]*\) .*/\1/p'
+ SERVERIP=
+++ dirname install.sh
++ cd .
++ pwd
+ path=/root
++ grep CentOS /etc/issue
+ '[' -n '' ']'
++ grep -E 'Debian|Ubuntu' /etc/issue
+ '[' -n '' ']'
+ exit 0


Very odd issue

I basically sent 10 requests, where half of them failed.

Checked the log, and this is what it said:

Apr  9 14:06:18 (1523275578.435215) sockd[840]: info: pass(1): tcp/connect ]: 3235 -> pam%[email protected] 54.38.153.211.2016 -> 565, 565 -> 54.38.153.211.49426 52.209.72.234.443 -> 3235: local client closed.  Session duration: 0s
Apr  9 14:06:18 (1523275578.454857) sockd[840]: info: pass(1): tcp/connect [: pam%[email protected] 54.38.153.211.2016 -> 54.38.153.211.49430 52.209.72.234.443
Apr  9 14:06:18 (1523275578.570533) sockd[834]: warning: accept(2) failed: Resource temporarily unavailable (errno = 11)
Apr  9 14:06:18 (1523275578.591564) sockd[840]: info: pass(1): tcp/connect ]: 3235 -> pam%[email protected] 54.38.153.211.2016 -> 565, 565 -> 54.38.153.211.49430 52.209.72.234.443 -> 3235: local client closed.  Session duration: 0s
Apr  9 14:06:18 (1523275578.610198) sockd[840]: info: pass(1): tcp/connect [: pam%[email protected] 54.38.153.211.2016 -> 54.38.153.211.49432 52.209.72.234.443
Apr  9 14:06:18 (1523275578.719587) sockd[834]: warning: accept(2) failed: Resource temporarily unavailable (errno = 11)
Apr  9 14:06:18 (1523275578.738714) sockd[840]: info: pass(1): tcp/connect ]: 3235 -> pam%[email protected] 54.38.153.211.2016 -> 565, 565 -> 54.38.153.211.49432 52.209.72.234.443 -> 3235: local client closed.  Session duration: 0s
Apr  9 14:06:20 (1523275580.840656) sockd[840]: info: pass(1): tcp/connect ]: 0 -> pam%[email protected] 54.38.153.211.2016 -> 0, 0 -> 54.38.153.211.49436 54.76.253.7.443 -> 0: remote peer error (No route to host).  Session duration: 2s
Apr  9 14:06:57 (1523275617.050838) sockd[834]: warning: accept(2) failed: Resource temporarily unavailable (errno = 11)
Apr  9 14:07:00 (1523275620.060585) sockd[840]: info: pass(1): tcp/connect ]: 0 -> pam%[email protected] 54.38.153.212.2016 -> 0, 0 -> 54.38.153.212.60322 54.76.253.7.443 -> 0: remote peer error (No route to host).  Session duration: 3s
Apr  9 14:07:00 (1523275620.070647) sockd[834]: warning: accept(2) failed: Resource temporarily unavailable (errno = 11)
Apr  9 14:07:03 (1523275623.060561) sockd[840]: info: pass(1): tcp/connect ]: 0 -> pam%[email protected] 54.38.153.212.2016 -> 0, 0 -> 54.38.153.212.60398 54.76.253.7.443 -> 0: remote peer error (No route to host).  Session duration: 3s
Apr  9 14:07:03 (1523275623.070694) sockd[834]: warning: accept(2) failed: Resource temporarily unavailable (errno = 11)
Apr  9 14:07:06 (1523275626.060626) sockd[840]: info: pass(1): tcp/connect ]: 0 -> pam%[email protected] 54.38.153.212.2016 -> 0, 0 -> 54.38.153.212.60484 54.76.253.7.443 -> 0: remote peer error (No route to host).  Session duration: 3s
Apr  9 14:07:06 (1523275626.070717) sockd[834]: warning: accept(2) failed: Resource temporarily unavailable (errno = 11)
Apr  9 14:07:06 (1523275626.108658) sockd[840]: info: pass(1): tcp/connect [: pam%[email protected] 54.38.153.212.2016 -> 54.38.153.212.60562 52.209.72.234.443
Apr  9 14:07:06 (1523275626.351711) sockd[834]: warning: accept(2) failed: Resource temporarily unavailable (errno = 11)
Apr  9 14:07:06 (1523275626.372518) sockd[840]: info: pass(1): tcp/connect ]: 3235 -> pam%[email protected] 54.38.153.212.2016 -> 565, 565 -> 54.38.153.212.60562 52.209.72.234.443 -> 3235: local client closed.  Session duration: 0s
Apr  9 14:07:06 (1523275626.388592) sockd[840]: info: pass(1): tcp/connect [: pam%[email protected] 54.38.153.212.2016 -> 54.38.153.212.60570 52.209.72.234.443
Apr  9 14:07:06 (1523275626.498006) sockd[834]: warning: accept(2) failed: Resource temporarily unavailable (errno = 11)
Apr  9 14:07:06 (1523275626.517380) sockd[840]: info: pass(1): tcp/connect ]: 3235 -> pam%[email protected] 54.38.153.212.2016 -> 565, 565 -> 54.38.153.212.60570 52.209.72.234.443 -> 3235: local client closed.  Session duration: 0s
Apr  9 14:07:06 (1523275626.534287) sockd[840]: info: pass(1): tcp/connect [: pam%[email protected] 54.38.153.212.2016 -> 54.38.153.212.60584 52.209.72.234.443
Apr  9 14:07:06 (1523275626.642230) sockd[834]: warning: accept(2) failed: Resource temporarily unavailable (errno = 11)
Apr  9 14:07:06 (1523275626.661393) sockd[840]: info: pass(1): tcp/connect ]: 3235 -> pam%[email protected] 54.38.153.212.2016 -> 565, 565 -> 54.38.153.212.60584 52.209.72.234.443 -> 3235: local client closed.  Session duration: 0s
Apr  9 14:07:06 (1523275626.696675) sockd[840]: info: pass(1): tcp/connect [: pam%[email protected] 54.38.153.212.2016 -> 54.38.153.212.60590 52.209.72.234.443
Apr  9 14:07:06 (1523275626.814290) sockd[834]: warning: accept(2) failed: Resource temporarily unavailable (errno = 11)
Apr  9 14:07:06 (1523275626.836070) sockd[840]: info: pass(1): tcp/connect ]: 3235 -> pam%[email protected] 54.38.153.212.2016 -> 565, 565 -> 54.38.153.212.60590 52.209.72.234.443 -> 3235: local client closed.  Session duration: 0s
Apr  9 14:07:09 (1523275629.060504) sockd[840]: info: pass(1): tcp/connect ]: 0 -> pam%[email protected] 54.38.153.212.2016 -> 0, 0 -> 54.38.153.212.60596 54.76.253.7.443 -> 0: remote peer error (No route to host).  Session duration: 3s
Apr  9 14:07:09 (1523275629.070567) sockd[834]: warning: accept(2) failed: Resource temporarily unavailable (errno = 11)
Apr  9 14:07:09 (1523275629.106488) sockd[840]: info: pass(1): tcp/connect [: pam%[email protected] 54.38.153.212.2016 -> 54.38.153.212.60660 52.209.72.234.443
Apr  9 14:07:09 (1523275629.215199) sockd[834]: warning: accept(2) failed: Resource temporarily unavailable (errno = 11)
Apr  9 14:07:09 (1523275629.234112) sockd[840]: info: pass(1): tcp/connect ]: 3235 -> pam%[email protected] 54.38.153.212.2016 -> 565, 565 -> 54.38.153.212.60660 52.209.72.234.443 -> 3235: local client closed.  Session duration: 0s
Apr  9 14:07:12 (1523275632.060577) sockd[840]: info: pass(1): tcp/connect ]: 0 -> pam%[email protected] 54.38.153.212.2016 -> 0, 0 -> 54.38.153.212.60672 54.76.253.7.443 -> 0: remote peer error (No route to host).  Session duration: 3s``````

Telegram calls not working

Same as here https://stackoverflow.com/questions/49855516/telegram-calls-via-dante-socks5-proxy-server-not-working but with @Lozy install.sh script for 1.3.2

Here is some log with udp/udpassociate action

Apr 19 16:17:33 (1524143853.147297) sockd[22468]: info: pass(1): tcp/connect ]: 258 -> pam%[email protected] 192.168.1.30.10800 -> 443, 443 -> 192.168.1.30.55570 149.154.167.51.5222 -> 258: local client closed. Session duration: 11s
Apr 19 16:17:36 (1524143856.086742) sockd[22464]: info: pass(1): udp/udpassociate [: pam%[email protected] 192.168.1.30.58761 -> 192.168.1.30.42546 0.0.0.0.0
Apr 19 16:17:38 (1524143858.388098) sockd[22468]: info: pass(1): tcp/connect ]: 687 -> pam%[email protected] 192.168.1.30.10800 -> 1128, 1128 -> 192.168.1.30.55569 149.154.167.51.80 -> 687: local client closed. Session duration: 16s
Apr 19 16:18:05 (1524143885.074179) sockd[22468]: info: pass(1): udp/udpassociate ]: 0/0 -> pam%[email protected] 192.168.1.30.58761 -> 0/0, 0/0 -> 192.168.1.30.42546 0.0.0.0.0 -> 0/0: local client closed. Session duration: 29s`

Install failed Debian-9 - x86_64

dante-1.3.2/example/sockd.conf
dante-1.3.2/example/sockd-basic.conf
dante-1.3.2/example/socks-simple-withoutnameserver.conf
dante-1.3.2/example/sockd-chaining.conf
dante-1.3.2/doc/Makefile.am
dante-1.3.2/doc/Makefile.in
dante-1.3.2/doc/sockd.8
dante-1.3.2/doc/sockd.conf.5
dante-1.3.2/doc/socks.conf.5
dante-1.3.2/doc/socksify.1
dante-1.3.2/doc/rfc1928.txt
dante-1.3.2/doc/rfc1929.txt
dante-1.3.2/doc/rfc1961.txt
dante-1.3.2/doc/SOCKS4.protocol
dante-1.3.2/doc/SOCKS4A.protocol
dante-1.3.2/doc/README.socksify
dante-1.3.2/doc/README.survey
dante-1.3.2/doc/README.usage
dante-1.3.2/bin/Makefile.am
dante-1.3.2/bin/Makefile.in
dante-1.3.2/bin/socksify.in
dante-1.3.2/SPECS/Makefile.am
dante-1.3.2/SPECS/Makefile.in
dante-1.3.2/SPECS/dante.spec.in
dante-1.3.2/SPECS/dante.spec
dante-1.3.2/capi/socks.h
dante-1.3.2/capi/socks_glibc.h
dante-1.3.2/capi/Makefile.am
dante-1.3.2/capi/Makefile.in
dante-1.3.2/capi/socks.h.in
dante-1.3.2/contrib/README
dante-1.3.2/contrib/Makefile.am
dante-1.3.2/contrib/Makefile.in
dante-1.3.2/contrib/sockd-stat.awk
dante-1.3.2/contrib/StartupItems.Dante
dante-1.3.2/contrib/StartupParameters.plist
dante-1.3.2/dlib64/Makefile.am
dante-1.3.2/dlib64/Makefile.in
bash: line 274: cd: too many arguments
make: *** No targets specified and no makefile found. Stop.
Synchronizing state of sockd.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable sockd

Dante Server Install Failed!

Issue when installing with more than 1 ip - "Install failed"

When installing with more than 1 ip I am getting

Dante Server Install Failed!

This only happens when installing with more than one ip.

--ip="a.a.a.a;b.b.b.b" --port=xxxx --user=xxxx --passwd=xxxx

The above gives the Dante Server Failed error, if I do it like this without the quotations in the ip option:

--ip=a.a.a.a;b.b.b.b --port=xxxx --user=xxxx --passwd=xxxx

I get the error

Error: User or password can't be blank

Using CentOS 6.9

Thanks

Not working without user

Without adding user it is not working. Need to fix this.
I tried without user but not it's working.

Debian 9 安装失败

系统:Debian 9
虚拟化架构:kvm

安装到下面这个地方,提示失败
dante-1.3.2/doc/socksify.1
dante-1.3.2/doc/rfc1928.txt
dante-1.3.2/doc/rfc1929.txt
dante-1.3.2/doc/rfc1961.txt
Dante Server Install Failed!

Server Install Fail

Receiving these errors

"Adding User For Dante SOCKS 5 daemon:
Error: User or password can't be blank
Synchronizing state of sockd.service with SysV init with /lib/systemd/systemd-sysv-install...
Executing /lib/systemd/systemd-sysv-install enable sockd
Failed to execute operation: Too many levels of symbolic links

Dante Server Install Failed!"

But has not asked me to input username and password. what have i missed?

多IP 安装失败

2017-05-17 12:42:09 (21.9 MB/s) - “install_centos.sh” saved [9442/9442]

[root@server823 ~]# bash install_centos.sh
Current Options:

Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
Error: Cannot find a valid baseurl for repo: base

gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now
install_centos.sh: line 258: gcc: command not found
Archive: libpam-pwdfile.zip
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of libpam-pwdfile.zip or
libpam-pwdfile.zip.zip, and cannot find libpam-pwdfile.zip.ZIP, period.
install_centos.sh: line 267: cd: libpam-pwdfile-master: No such file or directory
[ERROR] pam_pwdfile.so not exist!
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
Error: Cannot find a valid baseurl for repo: base

centos 6.X 64位

Error autmethod

If I put:

method: username
clientmethod: username

Cant start sockd.

CPU占用

启动后 多用户使用 CPU会跑满 拖挂机器 8核心 E5

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.