What's new

Entware [SOLUTION] Cross-Compile ProxyChains-NG Entware Package via Debian Live DVD

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

garycnew

Senior Member
NOTE: After finally being convinced by the Entware & OpenWRT Developers that neither Build Environment was meant to be Compiled Natively on a Router (Neutered C Libraries), I decided to pursue this Cross-Compile ProxyChains-NG Entware Package via Debian Live DVD solution; which, is presumably a bit slower, but ultimately successful. It wasn't too terrible after finding the right cross-compiling platform and combining a few different build references.

Requirements/Assumptions:

Cross-Compiling Host Machine:
1. Plenty of Physical Memory (RAM)
2. Debian Live (Testing) DVD
3. Flash Drive >= 32GB (Preferably USB 3.0/3.1)

ProxyChains-NG Installation Machine:
1. An Asuswrt-Merlin Compatible Router (i.e., Asus RT-AC66U)
2. Asuswrt-Merlin Compatible Firmware (i.e., 384.19)
3. Formated JFFS Partition and Enabled JFFS Custom Scripts and Configs
4. Entware installed on USB 3.0 Interface Device via Asuswrt-Merlin Terminal Menu (AMTM) with Swap File created

NOTE: Not sure if it matters... At the time of this writing, Debian Bullseye (Testing) Live DVD contained the same package versions as the current Entware repository, opposed to the Debian Buster (Stable) Live DVD, so we opted to use the Debian Bullseye (Testing) Live DVD.

### Download & Burn Debian Live (Testing) DVD ###
Code:
$ curl -L -O -C - http://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/weekly-live-builds/amd64/iso-hybrid/debian-live-testing-amd64-gnome+nonfree.iso

### Boot Debian Live (Testing) DVD on the Cross-Compiling Host Machine ###
Our Cross-Compiling Host Machine required the [F12] key to be pressed during boot to enter into the Boot Menu and select the Debian Live (Testing) DVD. Make sure you setup and have Internet access on the Cross-Compiling Host Machine.

### Open Terminal ###

### Mount Flash Drive (Repeat after each DVD Boot) ###
Code:
$ sudo -p /media/user/SanDiskSDCZ
$ sudo mount /dev/sdb1 /media/user/SanDiskSDCZ
$ cd /media/user/SanDiskSDCZ/

### Download & Install Build System (Repeat after each DVD Boot) ###
Code:
$ sudo apt-get update
$ sudo apt-get install git-core build-essential libssl-dev libncurses5-dev unzip gawk zlib1g-dev
$ sudo apt-get install python2 wget

### Clone, Setup, & Make Entware Build Env ###
Code:
$ git clone https://github.com/Entware/Entware.git
$ cd Entware

# Update OpenWRT Feeds
$ ./scripts/feeds update -a

# Symlink Packages (Repeat after each DVD Boot)
$ make package/symlinks

# Copy the config specific to your Architecture and Kernel versions
$ cp configs/armv7-2.6.config .config

$ make tools/install && make toolchain/install && make target/compile
or
#$ make -j1 V=sc tools/install
#$ make -j1 V=sc toolchain/install
#$ make -j1 V=sc target/compile

### Download, Prepare, & Compile Test Package from OpenWRT Feed ###
Code:
#$ ./scripts/feeds install screen
or
$ make -j1 V=sc package/screen/download
$ make -j1 V=sc package/screen/check
$ find package/ -iname "*screen*"
package/feeds/packages/screen

$ make -j1 V=sc package/screen/prepare
$ make -j1 V=sc package/screen/compile
#$ make -j1 V=sc package/screen/install
#$ make package/index

$ find bin/ -iname "*screen*"
bin/targets/armv7-2.6/generic-glibc/packages/screen_4.8.0-2_armv7-2.6.ipk

### Download & Prepare OpenWRT Feed Package modified for Entware (When Available) ###
Code:
#$ ./scripts/feeds install proxychains-ng
or
$ make -j1 V=sc package/feeds/packages/proxychains-ng/download
$ make -j1 V=sc package/feeds/packages/proxychains-ng/check
$ find package/ -iname "*proxychains-ng*"
package/feeds/packages/proxychains-ng

### Edit the Makefile to use the /opt directory prefix ###
Code:
$ diff package/feeds/packages/proxychains-ng/Makefile.orig package/feeds/packages/proxychains-ng/Makefile
49c49
< /etc/proxychains.conf
---
> /opt/etc/proxychains.conf
54,56c54,56
<     $(INSTALL_DIR) $(1)/usr/bin
<     $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/proxychains4 $(1)/usr/bin/
<     $(LN) proxychains4 $(1)/usr/bin/proxychains
---
>     $(INSTALL_DIR) $(1)/opt/bin
>     $(INSTALL_BIN) $(PKG_INSTALL_DIR)/opt/bin/proxychains4 $(1)/opt/bin/
>     $(LN) proxychains4 $(1)/opt/bin/proxychains
59,60c59,60
<     $(INSTALL_DIR) $(1)/usr/lib
<     $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libproxychains4.so $(1)/usr/lib/
---
>     $(INSTALL_DIR) $(1)/opt/lib
>     $(INSTALL_DATA) $(PKG_INSTALL_DIR)/opt/lib/libproxychains4.so $(1)/opt/lib/
63,64c63,64
<     $(INSTALL_DIR) $(1)/etc
<     $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/proxychains.conf $(1)/etc/
---
>     $(INSTALL_DIR) $(1)/opt/etc
>     $(INSTALL_DATA) $(PKG_INSTALL_DIR)/opt/etc/proxychains.conf $(1)/opt/etc/

### Select proxychains-ng for [M]odular inclusion under the SECTION => CATEGORY => SUBMENU of menuconfig ###
Code:
$ make menuconfig
define Package/proxychains-ng
SECTION:=net
CATEGORY:=Network
TITLE:=Redirect TCP traffic to a HTTP or SOCKS proxy
URL:=https://github.com/rofl0r/proxychains/
endef

### Compile OpenWRT Feed Package modified for Entware ###
Code:
$ make -j1 V=sc package/feeds/packages/proxychains-ng/prepare
$ make -j1 V=sc package/feeds/packages/proxychains-ng/compile
#$ make -j1 V=sc package/feeds/packages/proxychains-ng/install
#$ make package/index

$ find bin/ -iname "*proxychains-ng*"
bin/targets/armv7-2.6/generic-glibc/packages/proxychains-ng_4.15-1_armv7-2.6.ipk

### SFTP & SSH proxychains-ng Package to ProxyChains-NG Installation Machine(s) ###
Code:
$ cd bin/targets/armv7-2.6/generic-glibc/packages/
$ sftp admin@192.168.0.1
sftp> cd /tmp/mnt/SanDiskSDHC/
sftp> put proxychains-ng_4.15-1_armv7-2.6.ipk

$ ssh admin@192.168.0.1
# cd /tmp/mnt/SanDiskSDHC/
# opkg install ./proxychains-ng_4.15-1_armv7-2.6.ipk

# opkg list-installed|grep -i proxychains
proxychains-ng - 4.15-1

# opkg files proxychains-ng
Package proxychains-ng (4.15-1) is installed on root and has the following files:
/opt/bin/proxychains4
/opt/lib/libproxychains4.so
/opt/bin/proxychains
/opt/etc/proxychains.conf

# opkg info proxychains-ng
Package: proxychains-ng
Version: 4.15-1
Depends: libc, libssp, librt, libpthread
Status: install user installed
Architecture: armv7-2.6
Conffiles:
/opt/etc/proxychains.conf abeab0c91cbf2f8a3c87a45059a1c939d027fbd51d43df14e8dc1652da0f535b
Installed-Time: 1642910684

# /opt/bin/proxychains4
Usage:    /opt/bin/proxychains4 -q -f config_file program_name [arguments]
    -q makes proxychains quiet - this overrides the config setting
    -f allows one to manually specify a configfile to use
    for example : proxychains telnet somehost.com
More help in README file

# /opt/bin/proxychains4 wget -O - https://ifconfig.me
or
# LD_PRELOAD=/opt/lib/libproxychains4.so wget -O - https://ifconfig.me

Congratulations! You've Cross-Compiled a ProxyChains-NG Entware Package via Debian Live (Testing) DVD! The Possibilities are Endless with Good-Times Ahead!

References:
Code:
http://bin.entware.net/armv7sf-k2.6/
http://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/weekly-live-builds/amd64/iso-hybrid/
https://packages.debian.org/search?keywords=search
https://oldwiki.archive.openwrt.org/about/toolchain
https://oldwiki.archive.openwrt.org/doc/howto/buildroot.exigence
https://oldwiki.archive.openwrt.org/doc/howto/build.a.package
https://github.com/Entware/Entware/wiki/How-to-add-a-new-package
https://github.com/Entware/Entware-ng/wiki/Using-gcc-%28native-compilation%29
https://github.com/rofl0r/proxychains-ng
https://github.com/amezin/openwrt-packages/blob/master/net/proxychains-ng/Makefile

### Full Edited proxychains-ng Makefile ###
Code:
$ cat feeds/packages/net/proxychains-ng/Makefile
#
# Copyright (C) 2019-2021 Daniel Bermond
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=proxychains-ng
PKG_VERSION:=4.15
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/rofl0r/proxychains-ng/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=c94edded38baa0447766f6e5d0ec1963bb27c7b55b2a78b305d6f58e171388f8

PKG_MAINTAINER:=Daniel Bermond <dbermond@archlinux.org>
PKG_LICENSE:=GPL-2.0-or-later
PKG_LICENSE_FILES:=COPYING

PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1

include $(INCLUDE_DIR)/package.mk

define Package/proxychains-ng
  SECTION:=net
  CATEGORY:=Network
  TITLE:=Redirect TCP traffic to a HTTP or SOCKS proxy
  URL:=https://github.com/rofl0r/proxychains/
endef

define Package/proxychains-ng/description
  A hook preloader that allows to redirect TCP traffic of
  existing dynamically linked programs through one or more
  SOCKS or HTTP proxies.
endef

define Build/Compile
    $(call Build/Compile/Default,all)
endef

define Build/Install
    $(call Build/Install/Default,install install-config)
endef

define Package/proxychains-ng/conffiles
/opt/etc/proxychains.conf
endef

define Package/proxychains-ng/install
    # binary executable
    $(INSTALL_DIR) $(1)/opt/bin
    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/opt/bin/proxychains4 $(1)/opt/bin/
    $(LN) proxychains4 $(1)/opt/bin/proxychains
  
    # library
    $(INSTALL_DIR) $(1)/opt/lib
    $(INSTALL_DATA) $(PKG_INSTALL_DIR)/opt/lib/libproxychains4.so $(1)/opt/lib/
  
    # config
    $(INSTALL_DIR) $(1)/opt/etc
    $(INSTALL_DATA) $(PKG_INSTALL_DIR)/opt/etc/proxychains.conf $(1)/opt/etc/
endef

$(eval $(call BuildPackage,proxychains-ng))
 

Attachments

  • proxychains-ng_4.15-1_armv7-2.6.txt
    22.7 KB · Views: 126
Last edited:
NOTE: After finally being convinced by the Entware & OpenWRT Developers that neither Build Environment was meant to be Compiled Natively on a Router (Neutered C Libraries), I decided to pursue this Cross-Compile ProxyChains-NG Entware Package via Debian Live DVD solution; which, is presumably a bit slower, but ultimately successful. It wasn't too terrible after finding the right cross-compiling platform and combining a few different build references.

Requirements/Assumptions:

Cross-Compiling Host Machine:
1. Plenty of Physical Memory (RAM)
2. Debian Live (Testing) DVD
3. Flash Drive >= 32GB (Preferably USB 3.0/3.1)

ProxyChains-NG Installation Machine:
1. An Asuswrt-Merlin Compatible Router (i.e., Asus RT-AC66U)
2. Asuswrt-Merlin Compatible Firmware (i.e., 384.19)
3. Formated JFFS Partition and Enabled JFFS Custom Scripts and Configs
4. Entware installed on USB 3.0 Interface Device via Asuswrt-Merlin Terminal Menu (AMTM) with Swap File created

NOTE: Not sure if it matters... At the time of this writing, Debian Bullseye (Testing) Live DVD contained the same package versions as the current Entware repository, opposed to the Debian Buster (Stable) Live DVD, so we opted to use the Debian Bullseye (Testing) Live DVD.

### Download & Burn Debian Live (Testing) DVD ###
Code:
$ curl -L -O -C - http://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/weekly-live-builds/amd64/iso-hybrid/debian-live-testing-amd64-gnome+nonfree.iso

### Boot Debian Live (Testing) DVD on the Cross-Compiling Host Machine ###
Our Cross-Compiling Host Machine required the [F12] key to be pressed during boot to enter into the Boot Menu and select the Debian Live (Testing) DVD. Make sure you setup and have Internet access on the Cross-Compiling Host Machine.

### Open Terminal ###

### Mount Flash Drive (Repeat after each DVD Boot) ###
Code:
$ sudo -p /media/user/SanDiskSDCZ
$ sudo mount /dev/sdb1 /media/user/SanDiskSDCZ
$ cd /media/user/SanDiskSDCZ/

### Download & Install Build System (Repeat after each DVD Boot) ###
Code:
$ sudo apt-get update
$ sudo apt-get install git-core build-essential libssl-dev libncurses5-dev unzip gawk zlib1g-dev
$ sudo apt-get install python2 wget

### Clone, Setup, & Make Entware Build Env ###
Code:
$ git clone https://github.com/Entware/Entware.git
$ cd Entware

# Update OpenWRT Feeds
$ ./scripts/feeds update -a

# Symlink Packages (Repeat after each DVD Boot)
$ make package/symlinks

# Copy the config specific to your Architecture and Kernel versions
$ cp configs/armv7-2.6.config .config

$ make tools/install && make toolchain/install && make target/compile
or
#$ make -j1 V=sc tools/install
#$ make -j1 V=sc toolchain/install
#$ make -j1 V=sc target/compile

### Download, Prepare, & Compile Test Package from OpenWRT Feed ###
Code:
#$ ./scripts/feeds install screen
or
$ make -j1 V=sc package/screen/download
$ make -j1 V=sc package/screen/check
$ find package/ -iname "*screen*"
package/feeds/packages/screen

$ make -j1 V=sc package/screen/prepare
$ make -j1 V=sc package/screen/compile
#$ make -j1 V=sc package/screen/install
#$ make package/index

$ find bin/ -iname "*screen*"
bin/targets/armv7-2.6/generic-glibc/packages/screen_4.8.0-2_armv7-2.6.ipk

### Download & Prepare OpenWRT Feed Package modified for Entware (When Available) ###
Code:
#$ ./scripts/feeds install proxychains-ng
or
$ make -j1 V=sc package/feeds/packages/proxychains-ng/download
$ make -j1 V=sc package/feeds/packages/proxychains-ng/check
$ find package/ -iname "*proxychains-ng*"
package/feeds/packages/proxychains-ng

### Edit the Makefile to use the /opt directory prefix ###
Code:
$ diff package/feeds/packages/proxychains-ng/Makefile.orig package/feeds/packages/proxychains-ng/Makefile
49c49
< /etc/proxychains.conf
---
> /opt/etc/proxychains.conf
54,56c54,56
<     $(INSTALL_DIR) $(1)/usr/bin
<     $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/proxychains4 $(1)/usr/bin/
<     $(LN) proxychains4 $(1)/usr/bin/proxychains
---
>     $(INSTALL_DIR) $(1)/opt/bin
>     $(INSTALL_BIN) $(PKG_INSTALL_DIR)/opt/bin/proxychains4 $(1)/opt/bin/
>     $(LN) proxychains4 $(1)/opt/bin/proxychains
59,60c59,60
<     $(INSTALL_DIR) $(1)/usr/lib
<     $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libproxychains4.so $(1)/usr/lib/
---
>     $(INSTALL_DIR) $(1)/opt/lib
>     $(INSTALL_DATA) $(PKG_INSTALL_DIR)/opt/lib/libproxychains4.so $(1)/opt/lib/
63,64c63,64
<     $(INSTALL_DIR) $(1)/etc
<     $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/proxychains.conf $(1)/etc/
---
>     $(INSTALL_DIR) $(1)/opt/etc
>     $(INSTALL_DATA) $(PKG_INSTALL_DIR)/opt/etc/proxychains.conf $(1)/opt/etc/

### Select proxychains-ng for [M]odular inclusion under the SECTION => CATEGORY => SUBMENU of menuconfig ###
Code:
$ make menuconfig
define Package/proxychains-ng
SECTION:=net
CATEGORY:=Network
TITLE:=Redirect TCP traffic to a HTTP or SOCKS proxy
URL:=https://github.com/rofl0r/proxychains/
endef

### Compile OpenWRT Feed Package modified for Entware ###
Code:
$ make -j1 V=sc package/feeds/packages/proxychains-ng/prepare
$ make -j1 V=sc package/feeds/packages/proxychains-ng/compile
#$ make -j1 V=sc package/feeds/packages/proxychains-ng/install
#$ make package/index

$ find bin/ -iname "*proxychains-ng*"
bin/targets/armv7-2.6/generic-glibc/packages/proxychains-ng_4.15-1_armv7-2.6.ipk

### SFTP & SSH proxychains-ng Package to ProxyChains-NG Installation Machine(s) ###
Code:
$ cd bin/targets/armv7-2.6/generic-glibc/packages/
$ sftp admin@192.168.0.1
sftp> cd /tmp/mnt/SanDiskSDHC/
sftp> put proxychains-ng_4.15-1_armv7-2.6.ipk

$ ssh admin@192.168.0.1
# cd /tmp/mnt/SanDiskSDHC/
# opkg install ./proxychains-ng_4.15-1_armv7-2.6.ipk

# opkg list-installed|grep -i proxychains
proxychains-ng - 4.15-1

# opkg files proxychains-ng
Package proxychains-ng (4.15-1) is installed on root and has the following files:
/opt/bin/proxychains4
/opt/lib/libproxychains4.so
/opt/bin/proxychains
/opt/etc/proxychains.conf

# opkg info proxychains-ng
Package: proxychains-ng
Version: 4.15-1
Depends: libc, libssp, librt, libpthread
Status: install user installed
Architecture: armv7-2.6
Conffiles:
/opt/etc/proxychains.conf abeab0c91cbf2f8a3c87a45059a1c939d027fbd51d43df14e8dc1652da0f535b
Installed-Time: 1642910684

# /opt/bin/proxychains4
Usage:    /opt/bin/proxychains4 -q -f config_file program_name [arguments]
    -q makes proxychains quiet - this overrides the config setting
    -f allows one to manually specify a configfile to use
    for example : proxychains telnet somehost.com
More help in README file

# /opt/bin/proxychains4 wget -O - https://ifconfig.me
or
# LD_PRELOAD=/opt/lib/libproxychains4.so wget -O - https://ifconfig.me

Congratulations! You've Cross-Compiled a ProxyChains-NG Entware Package via Debian Live (Testing) DVD! The Possibilities are Endless with Good-Times Ahead!

References:
Code:
http://bin.entware.net/armv7sf-k2.6/
http://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/weekly-live-builds/amd64/iso-hybrid/
https://packages.debian.org/search?keywords=search
https://oldwiki.archive.openwrt.org/about/toolchain
https://oldwiki.archive.openwrt.org/doc/howto/buildroot.exigence
https://oldwiki.archive.openwrt.org/doc/howto/build.a.package
https://github.com/Entware/Entware/wiki/How-to-add-a-new-package
https://github.com/Entware/Entware-ng/wiki/Using-gcc-%28native-compilation%29
https://github.com/rofl0r/proxychains-ng
https://github.com/amezin/openwrt-packages/blob/master/net/proxychains-ng/Makefile

### Full Edited proxychains-ng Makefile ###
Code:
$ cat feeds/packages/net/proxychains-ng/Makefile
#
# Copyright (C) 2019-2021 Daniel Bermond
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=proxychains-ng
PKG_VERSION:=4.15
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/rofl0r/proxychains-ng/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=c94edded38baa0447766f6e5d0ec1963bb27c7b55b2a78b305d6f58e171388f8

PKG_MAINTAINER:=Daniel Bermond <dbermond@archlinux.org>
PKG_LICENSE:=GPL-2.0-or-later
PKG_LICENSE_FILES:=COPYING

PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1

include $(INCLUDE_DIR)/package.mk

define Package/proxychains-ng
  SECTION:=net
  CATEGORY:=Network
  TITLE:=Redirect TCP traffic to a HTTP or SOCKS proxy
  URL:=https://github.com/rofl0r/proxychains/
endef

define Package/proxychains-ng/description
  A hook preloader that allows to redirect TCP traffic of
  existing dynamically linked programs through one or more
  SOCKS or HTTP proxies.
endef

define Build/Compile
    $(call Build/Compile/Default,all)
endef

define Build/Install
    $(call Build/Install/Default,install install-config)
endef

define Package/proxychains-ng/conffiles
/opt/etc/proxychains.conf
endef

define Package/proxychains-ng/install
    # binary executable
    $(INSTALL_DIR) $(1)/opt/bin
    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/opt/bin/proxychains4 $(1)/opt/bin/
    $(LN) proxychains4 $(1)/opt/bin/proxychains
 
    # library
    $(INSTALL_DIR) $(1)/opt/lib
    $(INSTALL_DATA) $(PKG_INSTALL_DIR)/opt/lib/libproxychains4.so $(1)/opt/lib/
 
    # config
    $(INSTALL_DIR) $(1)/opt/etc
    $(INSTALL_DATA) $(PKG_INSTALL_DIR)/opt/etc/proxychains.conf $(1)/opt/etc/
endef

$(eval $(call BuildPackage,proxychains-ng))
I might have to take a stab at this. Thanks for your consistent dedication for compiling. :D
 
I might have to take a stab at this. Thanks for your consistent dedication for compiling. :D
I've discovered that proxychains-ng works very well with Tor and is a better replacement to torsocks in some implementations. Enjoy! ;)
 
I tried to compile it for RT-AC68U by changing target to aarch64 but when I run proxychain I get this error
Code:
admin@RT-AC86U-1DE0:/tmp/home/root# proxychains4 curl ifconfig.me
[proxychains] config file found: /opt/etc/proxychains.conf
[proxychains] preloading /opt/lib/libproxychains4.so
ERROR: ld.so: object '/opt/lib/libproxychains4.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
 
I tried to compile it for RT-AC68U by changing target to aarch64 but when I run proxychain I get this error
Code:
admin@RT-AC86U-1DE0:/tmp/home/root# proxychains4 curl ifconfig.me
[proxychains] config file found: /opt/etc/proxychains.conf
[proxychains] preloading /opt/lib/libproxychains4.so
ERROR: ld.so: object '/opt/lib/libproxychains4.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
You mean to armv7 correct?
 
I tried the armv7 target but the resulting ipk is not installable
Code:
admin@RT-AC86U-1DE0:/tmp/mnt/asus-ext4/entware/tmp# opkg install proxychains-ng_4.16-1_armv7-3.2.ipk
Unknown package 'proxychains-ng'.
Collected errors:
 * pkg_hash_fetch_best_installation_candidate: Packages for proxychains-ng found, but incompatible with the architectures configured
 * opkg_install_cmd: Cannot install package proxychains-ng.

the binary also appears to be looking for the interpreter in the wrong directory, ld-linux.so.3 is located in /lib
Code:
admin@RT-AC86U-1DE0:/tmp/mnt/asus-ext4/entware/tmp# patchelf --print-interpreter proxychains
/opt/lib/ld-linux.so.3

proxychains compiled with the armv7 target work but I couldn't get a binary that uses /lib/ld-linux.so.3 as the interpreter instead of /opt/lib/ld-linux.so.3 and obviously I can't install it via ipk produced but only using the binary files directly after creating a symbolic link to /opt/lib/ld-linux.so.3
 
Last edited:
I tried the armv7 target but the resulting ipk is not installable
Code:
admin@RT-AC86U-1DE0:/tmp/mnt/asus-ext4/entware/tmp# opkg install proxychains-ng_4.16-1_armv7-3.2.ipk
Unknown package 'proxychains-ng'.
Collected errors:
 * pkg_hash_fetch_best_installation_candidate: Packages for proxychains-ng found, but incompatible with the architectures configured
 * opkg_install_cmd: Cannot install package proxychains-ng.

the binary also appears to be looking for the interpreter in the wrong directory, ld-linux.so.3 is located in /lib
Code:
admin@RT-AC86U-1DE0:/tmp/mnt/asus-ext4/entware/tmp# patchelf --print-interpreter proxychains
/opt/lib/ld-linux.so.3

proxychains compiled with the armv7 target work but I couldn't get a binary that uses /lib/ld-linux.so.3 as the interpreter instead of /opt/lib/ld-linux.so.3 and obviously I can't install it via ipk produced but only using the binary files directly after creating a symbolic link to /opt/lib/ld-linux.so.3

@70mmy

Did you edit the proxychains-ng/Makefile to use /lib instead of /opt/lib path?

Change From:
# library
$(INSTALL_DIR) $(1)/opt/lib
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/opt/lib/libproxychains4.so $(1)/opt/lib/

Change To:
# library
$(INSTALL_DIR) $(1)/lib
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/lib/libproxychains4.so $(1)/lib/

Kind Regards,


Gary
 
NOTE: After finally being convinced by the Entware & OpenWRT Developers that neither Build Environment was meant to be Compiled Natively on a Router (Neutered C Libraries), I decided to pursue this Cross-Compile ProxyChains-NG Entware Package via Debian Live DVD solution; which, is presumably a bit slower, but ultimately successful. It wasn't too terrible after finding the right cross-compiling platform and combining a few different build references.

Not sure what problem you're trying to solve...

The various toolchains/sdk's are there for a reason, and they generate optimized code for the platforms...
 
Not sure what problem you're trying to solve...

The various toolchains/sdk's are there for a reason, and they generate optimized code for the platforms...

@sfx2000

At the time of the original posting, proxychains-ng wasn't available for the architecture and kernel version in which I needed it. So... I decided to roll my own and created this posting from my notes.

Entware uses a modified OpenWRT packaging process that requires slight modification to the Makefile paths.

I hope that answers your question.

Kind Regards,


Gary
 
proxychains-ns seem to be still unavailable today either on entware and I'm looking for the easiest way to get a working binary for the rt-ac86u
 
@70mmy

Did you edit the proxychains-ng/Makefile to use /lib instead of /opt/lib path?

Change From:


Change To:


Kind Regards,


Gary
making this change will make /opt/lib/libproxychains4.so installed in /lib ? ... anyway i fixed using patchelf --set-interpreter /lib/ld-linux.so.3 /opt/bin/proxychains, if I really wanted to do things properly I would have to find a way to package everything in an ipk file
 
making this change will make /opt/lib/libproxychains4.so installed in /lib ?

Correct. The Makefile modification would only change where the libproxychains4.so is installed.

My ld-linux.so.3 is installed under /opt on my Asuswrt:

# find /opt/ -iname "*ld-linux*"
/opt/lib/ld-linux.so.3

Do you have Entware installed under the default location (/opt)?

Kind Regards,


Gary
 
Entware is installed under default location

Code:
admin@RT-AC86U-1DE0:/tmp/home/root# ls /opt/lib/ld*
/opt/lib/ld-2.27.so             /opt/lib/ld-linux-aarch64.so.1
 
Entware is installed under default location

Code:
admin@RT-AC86U-1DE0:/tmp/home/root# ls /opt/lib/ld*
/opt/lib/ld-2.27.so             /opt/lib/ld-linux-aarch64.so.1

Then, you shouldn't need to modify the Makefile.

Did you copy the configs/aarch64-#.#.config to .config? Where #.#.config is the kernel version.

$ cd Entware

# Update OpenWRT Feeds
$ ./scripts/feeds update -a

# Symlink Packages (Repeat after each DVD Boot)
$ make package/symlinks

# Copy the config specific to your Architecture and Kernel versions
$ cp configs/armv7-2.6.config .config

$ make tools/install && make toolchain/install && make target/compile

That should setup the config variables for the specific compilation environment.

Regards,


Gary
 
Just a thought: You could setup a custom Entware repository using GitHub workflow like this so others can just add the repository to their opkg.conf instead of compiling manually
 
Just a thought: You could setup a custom Entware repository using GitHub workflow like this so others can just add the repository to their opkg.conf instead of compiling manually

@jacklul

The issue is that there are a number of different architecture and kernel versions that the process supports and it often differs per person.

Case in point... My needs are for armv7-2.6; while @70mmy are for aarch64-some.kernel.

I thought it would be more helpful to provide guidance on rolling your own.

I appreciate the thought, though.

Respectfully,


Gary
 
The issue is that there are a number of different architecture and kernel versions that the process supports and it often differs per person.
It supports building using all Entware's build targets, I am using it to build packages for supported architectures in my repository
It is a matter of convenience, some may want to build themselves anyway while others just need ready to use package
 
It supports building using all Entware's build targets, I am using it to build packages for supported architectures in my repository
It is a matter of convenience, some may want to build themselves anyway while others just need ready to use package

@jacklul

You opt to build the package for all targets (architectures and kernels) and provide them as a repo?


Gary
 
I'd prefer not to put a package in my repo that I can't provide support for

@jacklul

The previous question was about your packaging process not whether you would include proxychains-ng in your repo.

Respectfully,


Gary
 
Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top