proxy - Dante Socks5 代理服务器未启动

标签 proxy socks dante

我已使用 website 中的以下方法安装了 Dante 代理服务器。但服务器无法启动并显示以下错误。我也尝试过其他网站的步骤。我搜索了 StackOverflow 并在一个问题中看到了同样的问题。但它已经解决了。任何人都可以解决它或建议我任何其他替代 SOCKS5 代理服务器

Job for danted.service failed because the control process exited with error code. See "systemctl status danted.service" and "journalctl -xe" for details.

systemctl status danted.service 和 Journalctl -xe 中显示错误

steven@steven-VirtualBox:~$ systemctl status danted.service
● danted.service - LSB: SOCKS (v4 and v5) proxy daemon (danted)
   Loaded: loaded (/etc/init.d/danted; bad; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2019-03-10 18:12:42 IST; 2min 59s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 3400 ExecStart=/etc/init.d/danted start (code=exited, status=1/FAILURE)

Mar 10 18:12:41 steven-VirtualBox systemd[1]: Starting LSB: SOCKS (v4 and v5) proxy daemon (danted)...
Mar 10 18:12:42 steven-VirtualBox danted[3405]: error: /etc/danted.conf: problem on line 11 near token "eth0": could not resolve hostname "eth0
Mar 10 18:12:42 steven-VirtualBox systemd[1]: danted.service: Control process exited, code=exited status=1
Mar 10 18:12:42 steven-VirtualBox danted[3400]: Starting Dante SOCKS daemon:
Mar 10 18:12:42 steven-VirtualBox systemd[1]: Failed to start LSB: SOCKS (v4 and v5) proxy daemon (danted).
Mar 10 18:12:42 steven-VirtualBox systemd[1]: danted.service: Unit entered failed state.
Mar 10 18:12:42 steven-VirtualBox systemd[1]: danted.service: Failed with result 'exit-code'.
steven@steven-VirtualBox:~$ journalctl -xe
-- The result is failed.
Mar 10 18:11:40 steven-VirtualBox systemd[1]: danted.service: Unit entered failed state.
Mar 10 18:11:40 steven-VirtualBox systemd[1]: danted.service: Failed with result 'exit-code'.
Mar 10 18:12:40 steven-VirtualBox sudo[3397]:   steven : TTY=pts/18 ; PWD=/home/steven ; USER=root ; COMMAND=/bin/systemctl restart danted
Mar 10 18:12:41 steven-VirtualBox sudo[3397]: pam_unix(sudo:session): session opened for user root by (uid=0)
Mar 10 18:12:41 steven-VirtualBox systemd[1]: Stopped LSB: SOCKS (v4 and v5) proxy daemon (danted).
-- Subject: Unit danted.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit danted.service has finished shutting down.
Mar 10 18:12:41 steven-VirtualBox systemd[1]: Starting LSB: SOCKS (v4 and v5) proxy daemon (danted)...
-- Subject: Unit danted.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit danted.service has begun starting up.
Mar 10 18:12:42 steven-VirtualBox danted[3405]: error: /etc/danted.conf: problem on line 11 near token "eth0": could not resolve hostname "eth0
Mar 10 18:12:42 steven-VirtualBox danted[3405]: alert: mother[1/1]: shutting down
Mar 10 18:12:42 steven-VirtualBox systemd[1]: danted.service: Control process exited, code=exited status=1
Mar 10 18:12:42 steven-VirtualBox danted[3400]: Starting Dante SOCKS daemon:
Mar 10 18:12:42 steven-VirtualBox sudo[3397]: pam_unix(sudo:session): session closed for user root
Mar 10 18:12:42 steven-VirtualBox systemd[1]: Failed to start LSB: SOCKS (v4 and v5) proxy daemon (danted).
-- Subject: Unit danted.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit danted.service has failed.
-- 
-- The result is failed.
Mar 10 18:12:42 steven-VirtualBox systemd[1]: danted.service: Unit entered failed state.
Mar 10 18:12:42 steven-VirtualBox systemd[1]: danted.service: Failed with result 'exit-code'.
Mar 10 18:12:50 steven-VirtualBox sudo[3407]:   steven : TTY=pts/18 ; PWD=/home/steven ; USER=root ; COMMAND=/bin/systemctl status danted
Mar 10 18:12:50 steven-VirtualBox sudo[3407]: pam_unix(sudo:session): session opened for user root by (uid=0)
Mar 10 18:14:38 steven-VirtualBox sudo[3407]: pam_unix(sudo:session): session closed for user root

最佳答案

我遇到了同样的问题并遇到了你的问题。我通过将 network-online.target 的 systemd 依赖项添加到 danted.service 来修复它,基于阅读此 https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/

方法如下:

sudo systemctl edit danted.service

添加此:

    [Unit]
    After=network-online.target
    Wants=network-online.target

保存并退出,运行它以获得良好的效果

sudo systemctl daemon-reload
sudo systemctl enable danted.service

关于proxy - Dante Socks5 代理服务器未启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55063462/

相关文章:

python - 如何从文本文件中获取代理ip和端口

javascript - 代理 HTMLElement

php - 使用SOCKS代理在php中建立套接字连接

python - 如何根据 Python 请求轮换代理

java - 在 HtmlUnit 中设置代理

ubuntu - Dante 代理无法在 ubuntu 18.04 上运行,导致协商超时

ubuntu - Dante socks 代理中的多个 `to: `

ssl - 通过我的代理的 HTTPS 隧道

Java Proxy.newProxyInstance() 抛出类型转换异常?