rapiz1 / rathole

A lightweight and high-performance reverse proxy for NAT traversal, written in Rust. An alternative to frp and ngrok.
Apache License 2.0
8.82k stars 441 forks source link

Build for 'arm64' and 'armhf' #285

Open hwittenborn opened 9 months ago

hwittenborn commented 9 months ago

See hwittenborn/rathole#6142076855 for the test run I did with these changes. Also note that the commit used in that run has been removed from a force push (to allow this PR to be made), though the commit can be found here: hwittenborn/rathole:9c5e606e7f3ff52e36b63c26d5851fcf0f5715b9.

I have cargo being installed via apk as the rust:alpine image doesn't currently build for the linux/armhf Docker platform (see https://github.com/rust-lang/docker-rust/issues/142).

Closes #141.

hwittenborn commented 9 months ago

I'm getting a local issue where there's some missing libraries in the built image - I'm not sure if it's just something on my machine, but I thought it should be mentioned in case it needs to get looked at before a merge.

rapiz1 commented 9 months ago

I'm getting a local issue where there's some missing libraries in the built image

Hey, can you elaborate on that? Is it TLS related?

BTW, @rucciva has changed the dockerfile to another base, which should solve the TLS problem. Would you mind test it again? It will be great to publish docker image for arm platforms.

Thanks for looking into this!

hwittenborn commented 9 months ago

Thanks for the update @rapiz1!

Hey, can you elaborate on that? Is it TLS related?

I haven't needed the images outside of amd64 as of recent (I needed armhf previously for my raspberry PI, which I no longer use), and I've since forgotten on the specifics that was causing the breakage.

BTW, @rucciva has changed the dockerfile to another base, which should solve the TLS problem.

Went ahead and did that, let me know if there's anything else that'd need to be done. This PR's pretty tiny at this point too, so feel free to just make the changes yourself if there's something else that needs fixed up.

rapiz1 commented 9 months ago

Unfortunately I don't have a platform to test this as well :(

hwittenborn commented 9 months ago

I do have the Raspberry Pi still @rapiz1, I won't be able to use it until tomorrow but I can get this all tested then.

Freekers commented 8 months ago

Unfortunately I don't have a platform to test this as well :(

Oracle offers a free ARM Based VPS on their Free Tier. Might come in handy in case you don't have an ARM based platform to test on :) Alternatively, Hetzner offers an ARM based VPS as low as € 0.007 / hour.

rapiz1 commented 4 months ago

@sunmy2019 this is a low hanging fruit that could be very useful to many users. It would be great if you're able to look into this.

BrammyS commented 2 weeks ago

@rapiz1 I have build the docker image for an linux/arm64 machine and it seems to be running fine. Is there anything specific i should test to get this merged? :)

fightforlife commented 2 weeks ago

Would also love this for oracle free tier.