erebe / wstunnel

Tunnel all your traffic over Websocket or HTTP2 - Bypass firewalls/DPI - Static binary available
Other
3.22k stars 289 forks source link

Binary for MIPS architecture #21

Closed oct8l closed 3 years ago

oct8l commented 4 years ago

Hi there erebe, I was wondering if you have all of the tools at your disposal to create a MIPS-compliant binary. The GL-iNet AR300M is an awesome little travel router, and I was wanting to get wstunnel set up on it for an upcoming trip.

If not, I'm planning on cloning and seeing if I can get one to build successfully, but I'm not familiar with Haskell and I haven't worked with it before for any projects.

Here's an output of /proc/cpuinfo for reference:

root@ar300m:~# cat /proc/cpuinfo
system type             : Qualcomm Atheros QCA9533 ver 2 rev 0
machine                 : GL.iNet GL-AR300M
processor               : 0
cpu model               : MIPS 24Kc V7.4
BogoMIPS                : 432.53
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 16
extra interrupt vector  : yes
hardware watchpoint     : yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
isa                     : mips1 mips2 mips32r1 mips32r2
ASEs implemented        : mips16
shadow register sets    : 1
kscratch registers      : 0
package                 : 0
core                    : 0
VCED exceptions         : not available
VCEI exceptions         : not available

Thanks for checking out my request and I hope to hear back!

Bountysource

oct8l commented 4 years ago

I've added a bounty for fun, if anyone knows Haskell compiling better than me.

erebe commented 4 years ago

Hello, Sadly I don't have any MIPS machine at hand. I tried yesterday to use this https://aws.amazon.com/marketplace/pp/B07JG7DS8L, but sadly I don't even manage to log into the machine... If you know where I can rent one, I can give it a try

In any case, I am not even sure that the Haskell compiler is working on MIPS ...

P.S: Lol for the bounty, never thought someone would go to such extend for wstunnel

oct8l commented 4 years ago

I have my travel router available that I could try building it on, if I follow the How to Build section, will the Haskell compiler output a binary that I'd then be able to share? I wasn't sure how it works and I've been pretty bad at googling so far.

seisdr commented 3 years ago

who's erebe

arinc9 commented 3 years ago

I have my travel router available that I could try building it on, if I follow the How to Build section, will the Haskell compiler output a binary that I'd then be able to share? I wasn't sure how it works and I've been pretty bad at googling so far.

@oct8l is the bounty still on? I might have someone who can do it for you.

oct8l commented 3 years ago

I have my travel router available that I could try building it on, if I follow the How to Build section, will the Haskell compiler output a binary that I'd then be able to share? I wasn't sure how it works and I've been pretty bad at googling so far.

@oct8l is the bounty still on? I might have someone who can do it for you.

Whoa, it's been a bit since I've signed into GitHub...I'll close this issue for now because I can't for the life of me remember what this was going to be for. But I appreciate the comment for sure!

andrew-aladjev commented 3 weeks ago

Hello everyone, it is nice to meet you.

I was thinking about using wstunnel on the router, I've bought Asus RX-AX53U, installed openwrt. It has a mt7621 CPU, and its arch is mipsel 24kc. Openwrt provides docker package for mipsel 24kc. Unfortunately, mips architecture is not supported by rust officially. Meanwhile, recent version of go supports mips.

When rust will support mips arch we can just build wstunnel (and every new release) in docker. Router CPUs are powerful enough for that purpose. Today such build for mips requires an enormous amount of effort.

andrew-aladjev commented 3 weeks ago

PS If you want to buy router that can run wstunnel for sure, you have to buy Asus TUF-AX6000. There are no real alternatives. It has MT7986(Filogic 830) onboard; it is actually aarch (arm64) CPU. Rust is supporting aarch officially, so you can install openwrt and start wstunnel (inside docker or even without docker).