shadowsocks / v2ray-plugin

A SIP003 plugin based on v2ray
MIT License
2.7k stars 577 forks source link

It does not start ss-server-enabled plug-ins v2ray + TLS #202

Open f1h0 opened 4 years ago

f1h0 commented 4 years ago

I have tried all of the options does not want to run through systemctl start shadowsocks-libev.service and if so run ss-server -c /etc/shadowsocks-libev/config.json --plugin-opts "server;tls;host=host.my" everything works

Here the error itself at startup

root@strvp:~# systemctl start shadowsocks-libev.service
root@strvp:~# tail -f  | systemctl status shadowsocks-libev.service
tail: warning: following standard input indefinitely is ineffective
● shadowsocks-libev.service - Shadowsocks-libev Default Server Service
   Loaded: loaded (/lib/systemd/system/shadowsocks-libev.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/shadowsocks-libev.service.d
           └─10-restart-failure.conf
   Active: activating (auto-restart) (Result: exit-code) since Sun 2020-05-10 14:20:32 UTC; 3s ago
     Docs: man:shadowsocks-libev(8)
  Process: 2282 ExecStart=/usr/bin/ss-server -c $CONFFILE $DAEMON_ARGS (code=exited, status=255)
 Main PID: 2282 (code=exited, status=255)

May 10 14:20:32 strvp systemd[1]: shadowsocks-libev.service: Main process exited, code=exited, status=255/n/a
May 10 14:20:32 strvp systemd[1]: shadowsocks-libev.service: Unit entered failed state.
♥ay 10 14:20:32 strvp systemd[1]: shadowsocks-libev.service: Failed with result 'exit-code'.

my config file shadowsocks-libev

{
    "server":"IP_SERVER",
    "server_port":8530,
    "local_port":1080,
    "password":"Y7T1kBWhVl",
    "timeout":600,
    "method":"chacha20-ietf-poly1305",
    "fast_open":true,
    "plugin":"/etc/shadowsocks-libev/v2ray-plugin",
    "plugin_opts":"server;tls;host=host.my"
}

contents could /lib/systemd/system/shadowsocks-libev.service

#  This file is part of shadowsocks-libev.
#
#  Shadowsocks-libev is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 3 of the License, or
#  (at your option) any later version.
#
#  This file is default for Debian packaging. See also
#  /etc/default/shadowsocks-libev for environment variables.

[Unit]
Description=Shadowsocks-libev Default Server Service
Documentation=man:shadowsocks-libev(8)
After=network.target

[Service]
Type=simple
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
AmbientCapabilities=CAP_NET_BIND_SERVICE
EnvironmentFile=/etc/default/shadowsocks-libev
User=nobody
Group=nogroup
LimitNOFILE=32768
ExecStart=/usr/bin/ss-server -c $CONFFILE $DAEMON_ARGS

[Install]
WantedBy=multi-user.target

"/lib/systemd/system/shadowsocks-libev.service" 28L, 834C

how to solve the problem?

Gh0u1L5 commented 4 years ago

journalctl -u shadowsocks-libev.service will allow you to check the crash log of your service. If the error log is not verbose enough, you can pass some arguments to your executable to make it talk verbosely.

f1h0 commented 4 years ago

my brain exploded, I was so tired and went to look for the problem step by step.

  1. I cleaned off ufw rules
  2. then I turned on the firewall rules 443 and 80 ports
  3. Recreate the certificate from CloudFlare
  4. after a drop of my run

Now my cool bunch Shadowsocks + V2ray + SSLH + Nginx + TLS CloudFlare It works great with productivity 60-75% internet channel speed

But that's as far as it is safe do not know where the data can be leaked