This repository has been archived by the owner. It is now read-only.

Package request: simple-obfs #719

Closed
ohmyarch opened this Issue Jul 21, 2017 · 5 comments

Comments

4 participants
@ohmyarch

ohmyarch commented Jul 21, 2017

Package: simple-obfs

Intro: A simple obfusacting tool, designed as plugin server of shadowsocks.
Repo: https://github.com/shadowsocks/simple-obfs
License: GPLv3 or any later version of GPL

Platform: ASUS RT-68U, Asuswrt-Merlin, ARMv7

@maxduke

This comment has been minimized.

Show comment
Hide comment
@maxduke

maxduke Jul 29, 2017

I would like to request the same. This package is a plugin for package shadowsocks-libev.

maxduke commented Jul 29, 2017

I would like to request the same. This package is a plugin for package shadowsocks-libev.

@yicong2007

This comment has been minimized.

Show comment
Hide comment
@yicong2007

yicong2007 Aug 5, 2017

I would like to request the same.
Before the package is officially added into entware-ng, we can follow the simple-obfs for OpenWrt by @aa65535 and make an entware-ng version for our own.

I have just compiled obfs-local and use it in my RT-AC68U, it works fine for now. The following is HOW.

Follow How to add a new package to prepare the build environment. Compile shadowsocks-libev **_3.0.6-2 and install them first, this can confirm that you had prepared the build environment correctly.
Then cd to the Entware-ng folder and download the Makefile created by @aa65535

git clone https://github.com/aa65535/openwrt-simple-obfs.git feeds/packages/net/simple-obfs

Apply the following patch to the feeds/packages/net/simple-obfs/Makefile (we should change the install directory since we use /opt/bin instead of /usr/bin in Entware-ng. I also add submenu to keep the simple-obfs in the same submenu as shadowsocks-libev. )

@@ -33,6 +33,7 @@
 define Package/simple-obfs/Default
 	SECTION:=net
 	CATEGORY:=Network
+	SUBMENU:=Web Servers/Proxies
 	TITLE:=Simple-obfs
 	URL:=https://github.com/shadowsocks/simple-obfs
 	DEPENDS:=+libev +libudns +libpthread +libsodium
@@ -50,13 +51,13 @@
 CONFIGURE_ARGS += --disable-ssp --disable-documentation --disable-assert
 
 define Package/simple-obfs/install
-	$(INSTALL_DIR) $(1)/usr/bin
-	$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/obfs-local $(1)/usr/bin
+	$(INSTALL_DIR) $(1)/opt/bin
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/obfs-local $(1)/opt/bin
 endef
 
 define Package/simple-obfs-server/install
-	$(INSTALL_DIR) $(1)/usr/bin
-	$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/obfs-server $(1)/usr/bin
+	$(INSTALL_DIR) $(1)/opt/bin
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/obfs-server $(1)/opt/bin
 endef
 
 $(eval $(call BuildPackage,simple-obfs))

Use make package/symlinks to update the packages, use make menuconfig to enable simple-obfs and/or simple-obfs-server.
At last, use make package/simple-obfs/compile to compile.
If nothing got wrong, you would find simple-obfs-server_0.0.3-1_armv7soft.ipk and/or simple-obfs_0.0.3-1_armv7soft.ipk in the Entware-ng/bin/targets/armv7soft/generic-glibc/packages folder.
Use opkg install to install the ipks in your router.

yicong2007 commented Aug 5, 2017

I would like to request the same.
Before the package is officially added into entware-ng, we can follow the simple-obfs for OpenWrt by @aa65535 and make an entware-ng version for our own.

I have just compiled obfs-local and use it in my RT-AC68U, it works fine for now. The following is HOW.

Follow How to add a new package to prepare the build environment. Compile shadowsocks-libev **_3.0.6-2 and install them first, this can confirm that you had prepared the build environment correctly.
Then cd to the Entware-ng folder and download the Makefile created by @aa65535

git clone https://github.com/aa65535/openwrt-simple-obfs.git feeds/packages/net/simple-obfs

Apply the following patch to the feeds/packages/net/simple-obfs/Makefile (we should change the install directory since we use /opt/bin instead of /usr/bin in Entware-ng. I also add submenu to keep the simple-obfs in the same submenu as shadowsocks-libev. )

@@ -33,6 +33,7 @@
 define Package/simple-obfs/Default
 	SECTION:=net
 	CATEGORY:=Network
+	SUBMENU:=Web Servers/Proxies
 	TITLE:=Simple-obfs
 	URL:=https://github.com/shadowsocks/simple-obfs
 	DEPENDS:=+libev +libudns +libpthread +libsodium
@@ -50,13 +51,13 @@
 CONFIGURE_ARGS += --disable-ssp --disable-documentation --disable-assert
 
 define Package/simple-obfs/install
-	$(INSTALL_DIR) $(1)/usr/bin
-	$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/obfs-local $(1)/usr/bin
+	$(INSTALL_DIR) $(1)/opt/bin
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/obfs-local $(1)/opt/bin
 endef
 
 define Package/simple-obfs-server/install
-	$(INSTALL_DIR) $(1)/usr/bin
-	$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/obfs-server $(1)/usr/bin
+	$(INSTALL_DIR) $(1)/opt/bin
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/obfs-server $(1)/opt/bin
 endef
 
 $(eval $(call BuildPackage,simple-obfs))

Use make package/symlinks to update the packages, use make menuconfig to enable simple-obfs and/or simple-obfs-server.
At last, use make package/simple-obfs/compile to compile.
If nothing got wrong, you would find simple-obfs-server_0.0.3-1_armv7soft.ipk and/or simple-obfs_0.0.3-1_armv7soft.ipk in the Entware-ng/bin/targets/armv7soft/generic-glibc/packages folder.
Use opkg install to install the ipks in your router.

@zyxmon

This comment has been minimized.

Show comment
Hide comment
@zyxmon

zyxmon Dec 17, 2017

Member

If it is still needed, please report.
Now we have shadowsocksR-libev in repo - #736

Member

zyxmon commented Dec 17, 2017

If it is still needed, please report.
Now we have shadowsocksR-libev in repo - #736

@zyxmon zyxmon closed this Dec 17, 2017

@maxduke

This comment has been minimized.

Show comment
Hide comment
@maxduke

maxduke Dec 18, 2017

Thanks zyxmon. But the package is still needed for package shadowsocks-libev for full functionality. ( shadowsocksR-libev != shadowsocks-libev + simple-obfs )

maxduke commented Dec 18, 2017

Thanks zyxmon. But the package is still needed for package shadowsocks-libev for full functionality. ( shadowsocksR-libev != shadowsocks-libev + simple-obfs )

@zyxmon

This comment has been minimized.

Show comment
Hide comment
@zyxmon

zyxmon Dec 18, 2017

Member

simple-obfs is now in entware-3x - https://github.com/Entware-for-kernel-3x/rtndev-3x/tree/master/simple-obfs
binaries will be available soon.
I think it will be also added to Entware-ng

Member

zyxmon commented Dec 18, 2017

simple-obfs is now in entware-3x - https://github.com/Entware-for-kernel-3x/rtndev-3x/tree/master/simple-obfs
binaries will be available soon.
I think it will be also added to Entware-ng

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.