wangyu- / udp2raw

A Tunnel which Turns UDP Traffic into Encrypted UDP/FakeTCP/ICMP Traffic by using Raw Socket,helps you Bypass UDP FireWalls(or Unstable UDP Environment)
MIT License
7.35k stars 1.17k forks source link

udp2raw not working on OpenWRT #513

Open iz4tow opened 8 months ago

iz4tow commented 8 months ago

Good morning, I'm trying to use udp2raw on a BPI R3 with OpenWRT 23.05.2, but.....

root@OpenWrt:~# ./udp2raw_arm
./udp2raw_arm: line 1: syntax error: unexpected word (expecting ")")

How can I solve this?

Thanks in advance

HiGarfield commented 8 months ago

use arm64 instead of arm

iz4tow commented 8 months ago

There is no arm64 on the release tarball

HiGarfield commented 8 months ago

Copy the following folder to your openwrt code and then compile

https://github.com/HiGarfield/lede-17.01.4-Mod/tree/master/package/extra/udp2raw

iz4tow commented 8 months ago

I'm not very practical in openwrt...how can I compile it?

HiGarfield commented 8 months ago

What model is your wireless router? If it's a model officially supported by OpenWrt, I can try to compile it.

iz4tow commented 8 months ago

Bananapi R3

HiGarfield commented 8 months ago

udp2raw_aarch64_cortex-a53_bin.zip You can use either the udp2raw binary or the udp2raw_e42f0e57-1_aarch64_cortex-a53.ipk package.

iz4tow commented 8 months ago

It works! But how can I compile it by myself? Do you have a guide?

HiGarfield commented 8 months ago

I have prepared the Openwrt package source (Makefiles and a patch). You can compile it using Openwrt SDK.

Steps:

  1. Unzip the Openwrt SDK.
  2. Unzip udp2raw.zip and place the udp2raw folder into packages.
  3. Run the following commands:
    rm -f .config && make defconfig
    make package/udp2raw/clean V=s
    make package/udp2raw/compile V=s

    Then you can find the package bin/packages/aarch64_cortex-a53/base/udp2raw_e42f0e57-1_aarch64_cortex-a53.ipk, and also the binary build_dir/target-aarch64_cortex-a53_musl/udp2raw-e42f0e57/.pkgdir/udp2raw/usr/bin/udp2raw.

More details can be found at https://openwrt.org/docs/guide-developer/toolchain/using_the_sdk

iz4tow commented 8 months ago

Ok it works. But where did you find udpraw.zip? I would like to compile any new version by myself

Thanks

HiGarfield commented 8 months ago

Modified from https://github.com/sensec/openwrt-udp2raw.

To obtain the latest version, simply make modifications to PKG_SOURCE_VERSION and PKG_MIRROR_HASH in the Makefile.

iz4tow commented 8 months ago

Perfect. Could be a good idea to add a wiki on https://github.com/sensec/openwrt-udp2raw

Thanks a lot

wangyu- commented 7 months ago

i will include arm64 version in next release.