Is there ShadowsocksR server in OpenWrt for x86/router?

Correct me if I'm wrong.

If I have openwrt x86 img (soft router) running in VM, then I can start from here. Right?

Once that is running and you can confirm that the image runs on your "test" VM, then add the package according to the instructions.

git clone https://github.com/paulgit/openwrt-shadowsocksr.git package/feeds/shadowsocksr-libev

But openwrt x86 showing:
/bin/ash: git: not found

OpenWrt is not self-hosting, you need to use its buildroot for cross-compiling on another general purpose distribution (Arch, Debian, Fedora, Gentoo, OpenSuSE, Ubuntu, ...), even on x86.

In Ubuntu 18LTS till the following step.

Hopefully it will show up in make menuconfig -- if it doesn't try removing the OpenWrt ./tmp/ directory and its contents. (That is not your build system's /tmp/ , though that shouldn't kill you if you make that mistake.) Build to make sure it is "clean"

RM /tmp

then "make menuconfig" showing following:

Warning: make file 'package/feeds/shadowsocksr-libev/makefile' has a build dependency on 'libmbedltls' and 'libpcre', which does not exist

where to find them?

If not a typo, you removed /tmp/, not the tmp/ in your OpenWrt build root. Thankfully (and I've done it myself a few times), there usually isn't anything system-critical in /tmp/

Running, in the OpenWrt build root, on your build machine

./scripts/feeds update -a
./scripts/feeds install -a

should resolve that.

I removed ~/openwrt/tmp

Is it right?

1 Like

run
./scripts/feeds install -a

showing

Warning: make file 'package/feeds/shadowsocksr-libev/makefile' has a build dependency on 'libmbedltls' and 'libpcre', which does not exist

they may missed on the website?

You can edit your own posts, which make it easier to read than multiples (as well as there's a limit as to how many you can post in a row)

Yes, the "right" thing to remove, in my case, is

jeff@deb-devel:~/devel/openwrt$ rm -r ./tmp

Both libmbedtls and libpcre are common libraries that many packages use. They should be available after

./scripts/feeds update -a
./scripts/feeds install -s

package/libs/mbedtls/Makefile
feeds/packages/libs/pcre/Makefile

these two files are there.

./scripts/feeds update -a
./scripts/feeds install -s

still gave ,e the same warning" ...dependency on 'libmbedltls'/'libpcre' not exist

OK, I'm seeing the same error -- by using the </> button, you can format text, like copied error messages, for easy reading -- I assumed the l was a typo in transcription

jeff@deb-devel:~/devel/openwrt-ssd$ ./scripts/feeds install -a
Collecting package info: done
WARNING: Makefile 'package/feeds/shadowsocksr-libev/Makefile' has a build dependency on 'libmbedltls', which does not exist
WARNING: Makefile 'package/feeds/shadowsocksr-libev/Makefile' has a build dependency on 'libpcre', which does not exist
Installing all packages from feed packages.
Installing all packages from feed luci.
Installing all packages from feed routing.
Installing all packages from feed telephony.

I selected shadowsocks-libev-ss-server in make menuconfig

It built for me.

libmbedtls12 - 2.16.1-1
libnl-tiny - 0.1-5
libpcre - 8.43-1
[...]
shadowsocks-libev-config - 3.2.5-3
shadowsocks-libev-ss-server - 3.2.5-3

Now those dependencies will probably need to be looked at, but at least the code builds.

change:
openwrt/package/feeds/shadowsocksr-libev/Makefile
PKG_BUILD_DEPENDS:=libmbedtls libpcre
TO
PKG_BUILD_DEPENDS:=mbedtls pcre

Then no warning shownup

Or use [LEDE SDK 17.01.X] not OpenWRT 18.06 (I didn't test this one)

Even though no warning, SSR is still NOT showing up in make menuconfig.

I built on master with no issues (other than the broken dependencies), and shadowsocks-libev-ss-server showed up after

git clone https://github.com/paulgit/openwrt-shadowsocksr.git package/feeds/shadowsocksr-libev

Did you execute that from the top level of the OpenWrt build tree?

I would try master as v17 is effectively EOL and v18 is already at the point of not receiving any new features.

is not ssr.

I got the answer.

git clone https://github.com/paulgit/openwrt-shadowsocksr.git package/feeds/shadowsocksr-libev
;select from Network -> shadowsocksr-libev in menuconfig

git clone https://github.com/chenhw2/luci-app-shadowsocksr.git package/feeds/luci-app-shadowsocksr
;select from LuCI -> 3. Applications -> luci-app-shadowsocksr in menuconfig

1 Like

What I have to say it that, the ShadowsocksR server mentioned above requires a patched version of libmbedtls, and by default it builds a stand-alone libmbedtls package, which is further conflict with the Shadowsocks's libmbedtls package.

there can I find it (by default it builds a stand-alone libmbedtls package)? Thanks.

https://github.com/paulgit/openwrt-shadowsocksr.git package/feeds/shadowsocksr-libev

Seems SSR-client only. I'm looking for SSR-Server.