Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Needs signing to run on macOS #19

Open
kim0 opened this issue Aug 8, 2024 · 7 comments
Open

Needs signing to run on macOS #19

kim0 opened this issue Aug 8, 2024 · 7 comments

Comments

@kim0
Copy link

kim0 commented Aug 8, 2024

$ ft -h
Killed: 9
$ uname -a
Darwin MBP.local 23.5.0 Darwin Kernel Version 23.5.0: Wed May  1 20:12:58 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6000 arm64

Happy to help test different binaries if there's a way to make it work

@fiddyschmitt
Copy link
Owner

Thanks for the info Ahmed!

I'm not very familiar with Macs. What is the model of the laptop? What version of OSX are you running?

@kim0
Copy link
Author

kim0 commented Aug 9, 2024

It's an Apple M1 pro macbook running MacOS 14.5 (23F79) (latest)
Update: I could get it to run. This was needed

$ xattr -d com.apple.quarantine ~/Downloads/ft  # Remove attribute
$ codesign --force --deep --sign - ~/Downloads/ft  # Sign the binary (this will only work on my machine)

I think you can use GitHub actions runners for MacOS to verify the binary can at least run there.

It still doesn't seem to work very well. For example, it shows two mismatching version numbers 2.1 and 1.0.0.0 and when invoked with -h to just show the help message, it should do that and exit. Instead it does not exit, it just waits there, and I have to kill it via Ctrl+C

$ ~/Downloads/ft -h
8/9/2024 12:40:29 PM: File Tunnel 2.1.0
ft 1.0.0.0
Copyright ©  2023

ERROR(S):
  Option 'h' is unknown.

  --tcp-listen        Listen for TCP connections. Example --tcp-listen 127.0.0.1:11000

  --tcp-connect       Connect to a TCP server. Example --tcp-connect 127.0.0.1:22

  --read-duration     The duration (in milliseconds) to read data from a TCP connection. Larger values increase throughput (by reducing the number of small writes to file), whereas smaller values improve responsiveness.

  --udp-listen        A local address on which to listen for UDP data. Example --udp-listen 127.0.0.1:11000

  --udp-send-to       Forwards data to a UDP endpoint. Example --udp-send-to 192.168.1.50:12000

  --udp-send-from     A local address which UDP data will be sent from. Example --udp-send-from 192.168.1.1:11000

  -w, --write         Where to write data to. Example: --write "\\nas\share\1.dat"

  -r, --read          Where to read data from. Example: --read "\\nas\share\2.dat"

  -p, --purge-size    The size (in bytes) at which the file should be emptied and started anew. Setting this to 0 disables purging, and the file will grow indefinitely.

  --tunnel-timeout    The duration (in milliseconds) to wait for responses from the counterpart. If this timeout is reached, the tunnel is considered offline and TCP connections will be closed at this point.

  -v, --version       Print the version and exit.

  --help              Display this help screen.

  --version           Display version information.

^C

@fiddyschmitt
Copy link
Owner

Awesome info, thanks Ahmed. I didn't know about GitHub actions runners - I'll check it out :)

@kim0
Copy link
Author

kim0 commented Aug 9, 2024

Update this works very well on macos. I've established tunnels and pushed data through it, works beautifully. It would still be great to figure out this codesign'ing thing so that users don't have to do it.
The slightly weird behaviours I had noticed (two version numbers, the cli not exiting after -h) also happen on Windows, so it seems to be expected behaviour. Thanks for such a great tool!

@fiddyschmitt
Copy link
Owner

That's great! And thanks so much :)

@DUOLabs333
Copy link

DUOLabs333 commented Aug 15, 2024

It turns out that this is a known issue with C#: dotnet/sdk#34917

As a stopgap measure, you could either run signing on a runner, or use rcodesign.

@fiddyschmitt
Copy link
Owner

Interesting! Thanks @DUOLabs333

@fiddyschmitt fiddyschmitt changed the title Does not start on MacOS arm64 Needs signing to run on macOS Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants