Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

我用/etc/init.d/shadowsocks start启动ss服务端,客户端ss却上不了网了,而如果用ss-server -c /etc/shadowsocks-libev/config.json -v开启ss服务端,ss客户端就算不启用obfs也能正常上网了,急需帮助,谢谢。 #1674

Closed
flashbarry opened this issue Sep 9, 2017 · 13 comments
Labels

Comments

@flashbarry
Copy link

flashbarry commented Sep 9, 2017

Please answer these questions before submitting your issue. Thanks!

(Please mention that if the issue you filed is solved, you may wish to close it by yourself. Thanks again.)

(PS, you can remove 3 lines above, including this one, before post your issue.)

What version of shadowsocks-libev are you using?

3.0.8

What operating system are you using?

centos 7

What did you do?

你好,最近在鼓捣obfs,用了这个方法:

git clone https://github.com/shadowsocks/simple-obfs.git
cd simple-obfs
git submodule update --init --recursive
./autogen.sh
./configure && make
make install

,安装了obfs,然后在/etc/shadowsocks-libev/config.json中添加了
"plugin":"obfs-server",
"plugin_opts":"obfs=http"
奇怪的是,我用/etc/init.d/shadowsocks start启动ss服务端,客户端ss却上不了网了,而如果用ss-server -c /etc/shadowsocks-libev/config.json -v开启ss服务端,ss客户端就算不启用obfs也能正常上网了,急需帮助,谢谢。

What did you expect to see?

希望使用shadowsocks start服务端,在配置里有obfs的前提下,客户端不启用obfs也能正常上网。

What did you see instead?

我用/etc/init.d/shadowsocks start启动ss服务端,客户端ss却上不了网了,而如果用ss-server -c /etc/shadowsocks-libev/config.json -v开启ss服务端,ss客户端就算不启用obfs也能正常上网了,急需帮助,谢谢。

What is your config in detail (with all sensitive info masked)?

/etc/init.d/shadowsocks的里面的内容是这样的

#!/bin/bash

chkconfig: 2345 90 10

description: A secure socks5 proxy, designed to protect your Internet traffic.

BEGIN INIT INFO

Provides: Shadowsocks-libev

Required-Start: $network $syslog

Required-Stop: $network

Default-Start: 2 3 4 5

Default-Stop: 0 1 6

Short-Description: Fast tunnel proxy that helps you bypass firewalls

Description: Start or stop the Shadowsocks-libev server

END INIT INFO

Author: Teddysun [email protected]

Source function library

. /etc/rc.d/init.d/functions

Check that networking is up.

[ ${NETWORKING} ="yes" ] || exit 0

if [ -f /usr/local/bin/ss-server ]; then
DAEMON=/usr/local/bin/ss-server
elif [ -f /usr/bin/ss-server ]; then
DAEMON=/usr/bin/ss-server
fi
NAME=Shadowsocks-libev
CONF=/etc/shadowsocks-libev/config.json
PID_DIR=/var/run
PID_FILE=$PID_DIR/shadowsocks-libev.pid
RET_VAL=0

[ -x $DAEMON ] || exit 0

if [ ! -d $PID_DIR ]; then
mkdir -p $PID_DIR
if [ $? -ne 0 ]; then
echo "Creating PID directory $PID_DIR failed"
exit 1
fi
fi

if [ ! -f $CONF ]; then
echo "$NAME config file $CONF not found"
exit 1
fi

do_start() {
if [ -f $PID_FILE ]; then
read PID < $PID_FILE
echo "$NAME (pid $PID) is already running..."
exit 0
else
echo -n $"Starting ${NAME}: "
daemon $DAEMON -u -c $CONF -f $PID_FILE
fi

RETVAL=$?
[ $RETVAL -eq 0 ] && success
echo
}

do_stop() {
echo -n $"Stopping ${NAME}: "
killproc -p $PID_FILE
RETVAL=$?
[ $RETVAL -eq 0 ]
rm -f $PID_FILE
echo
}

do_status() {
if [ -f $PID_FILE ]; then
read PID < $PID_FILE
echo "$NAME (pid $PID) is running..."
else
echo "$NAME is stopped"
RETVAL=1
fi
}

do_restart() {
do_stop
do_start
}

case "$1" in
start|stop|restart|status)
do_$1
;;
*)
echo "Usage: $0 { start | stop | restart | status }"
RET_VAL=1
;;
esac

exit $RETVAL

@flashbarry
Copy link
Author

我的意思可能表述的不清楚,就是希望正确安装配置obfs服务端。

@flashbarry
Copy link
Author

因为按照网上的说法,obfs服务端配置正确,客户端不启用obfs也是应该能够上网的。

@rogers0
Copy link

rogers0 commented Sep 10, 2017

simple-obfs is not well maintained in centos.
if you want to use it, simple solution is switching to debian.

@flashbarry
Copy link
Author

@rogers0 有人能解决这个centos上obfs维护的问题吗?我用centos很长时间,觉得centos比较好。

@rogers0
Copy link

rogers0 commented Sep 10, 2017

@flashbarry
Copy link
Author

@rogers0 sorry, not very much understand what that webpage say, thank you all the way.

@hosiet
Copy link

hosiet commented Sep 10, 2017

That depends on how you installed ss-libev.

I noticed that the LSB service was provided by teddysun. You might be using teddysun's install script instead of copr/rpm package. That is not supported by upstream and you should find the downstream packager for advices on using ss-libev service together with simple-obfs.

@flashbarry
Copy link
Author

flashbarry commented Sep 10, 2017

@hosiet, do you mean, I should find teddysun for a solution? I just posted a comment in his website, no reply till now. maybe I should find him on github.

@flashbarry
Copy link
Author

could it because, I installed the kcptun server on the ss server,, and kcptun server cannot work with obfs-server?

@kyle18th
Copy link

一般服务器很少重启的吧。。。你就先用命令行迁就吧

@YGdevi
Copy link

YGdevi commented Sep 19, 2017

I have this problem, my system is debian, would like to know the problem solved?

@flashbarry
Copy link
Author

@YGdevi sorry, my system is centos.

@madeye madeye closed this as completed Sep 22, 2017
@flashbarry
Copy link
Author

@YGdevi I reinstall the shadowsocks-libev without the teddysun's install version, but with madeye's original version, and it works now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants