Interface Binding on Mac (New App!)

Feature requests for the Mac OS X version of Transmission
hbwhite
Posts: 12
Joined: Tue Feb 27, 2018 10:55 pm

Interface Binding on Mac (New App!)

Postby hbwhite » Wed Feb 28, 2018 12:51 am

Hi guys, for several years I've been using this horrible app called Vuze because it was the only app for Mac that offered "connection binding," where I could send traffic over my VPN connection only.

I finally wrote an app called Clutch to add this feature to Transmission! It is a separate app so you don't have to worry about patching, and it will continue to work when new updates to Transmission are released.

How does it work?

Transmission has a hidden option in its preferences file called "BindAddressIPv4" (and IPv6), which allows you to bind Transmission to an IP address. This is a nice feature, but it's a major inconvenience to have to update this address every time you start a new VPN connection. Clutch takes care of this for you!

The app has 2 parts:

  • Clutch is the GUI part of the app and allows you to select the interface you want to bind Transmission to.
  • Clutch Agent runs in the background (it has an icon in the menu bar) and monitors the IP address of the binding interface. When the IP address changes, it will update the binding IP address in Transmission's preferences and restart Transmission if it was running. There is also an option to start Clutch Agent automatically when you log in.

Changelog

v1.3:
- This version automatically checks for updates and allows you to update Clutch automatically within the app!
- It also fixes the issue found by @davids: Clutch now restarts Transmission if your binding interface disappears and reappears without changing its IP. This fixes an issue where Transmission would fail to bind to your VPN if it started before the interface was online (this could happen on boot if Transmission opened before your VPN started)

v1.2:
- Support for Dark Mode (colors have been adjusted to work in both Light and Dark Mode)
- You can now resize the window (uses AutoLayout so the UI is perfect)
- Other UI improvements

v1.1:
- Clutch now treats interfaces with the same name but different IPv4/IPv6 statuses as separate interfaces, preventing any traffic from accidentally being sent in the clear if a VPN doesn't support IPv6.

v1.0:
- Initial release

Download

Please note that this is new software and may have bugs!

You can download the app here (move it to your Applications folder):

Version 1.3:
https://mega.nz/#!2BYHGYJS!TYZUOT01O2uT ... 5V9ZtJ8qW4

Version 1.2:
https://mega.nz/#!2IAXUYJL!jN7EBqaT9mFQ ... GhfLqjxT9c

Version 1.1:
https://mega.nz/#!qEh1AQQY!TK2gStUVWhaS ... Jz1pYOyS5I

Version 1.0:
https://mega.nz/#!PYoQHKpY!ID4wO3XDzjfm ... bn3h7ZQXpc

Source Code

Clutch is fully open-source, so you can inspect the code yourself. I have licensed it under the BSD license and posted the full source code here:

https://github.com/hbwhite/Clutch

Like the app?

If you like the Clutch app, post a message here so more people can find it! Thanks!
Last edited by hbwhite on Fri Mar 01, 2019 3:23 am, edited 6 times in total.

fuori
Posts: 2
Joined: Fri Jul 13, 2018 12:25 pm

Re: Interface Binding on Mac (New App!)

Postby fuori » Fri Jul 13, 2018 12:29 pm

Hi Harrison,

I'm surprised nobody has replied to your thread yet, so I decided to make an account to thank you for your efforts! I'm glad I don't have to switch to Vuze or qBitTorrent because of this "missing" feature in Transmission (I understand the reasoning behind why it's not being implemented, yet I feel this is actually a must-have nowadays).
Just installed Clutch and tested it - working brilliantly so far!

Thanks again for your great work, keep it up!

Best,
Matt

hbwhite
Posts: 12
Joined: Tue Feb 27, 2018 10:55 pm

Re: Interface Binding on Mac (New App!)

Postby hbwhite » Sat Jul 14, 2018 2:25 pm

Thanks Matt! I was beginning to wonder if I was the only one who cared about this feature.

Glad to hear Clutch is working well for you. Hopefully other people who need interface binding will be able to find this thread!

hbwhite
Posts: 12
Joined: Tue Feb 27, 2018 10:55 pm

Re: Interface Binding on Mac (New App!)

Postby hbwhite » Mon Dec 03, 2018 12:12 am

Clutch version 1.1 available now:

https://mega.nz/#!qEh1AQQY!TK2gStUVWhaS ... Jz1pYOyS5I

(In Version 1.1, Clutch now treats interfaces with the same name but different IPv4/IPv6 statuses as separate interfaces, preventing any traffic from accidentally being sent in the clear if a VPN doesn't support IPv6.)

Updated code on GitHub.

zymverb
Posts: 1
Joined: Fri Dec 28, 2018 6:32 am

Re: Interface Binding on Mac (New App!)

Postby zymverb » Fri Dec 28, 2018 6:41 am

newbie:
Clutch info says: "Clutch Agent runs in the background (it has an icon in the menu bar) and monitors the IP address of the binding interface. When the IP address changes, it will update the binding IP address in Transmission's preferences and restart Transmission if it was running. There is also an option to start Clutch Agent automatically when you log in."

But yet Clutch requests: "Binding interface?" AND THEN ASKS ME TO SPECIFY -what I do not know.

What am I missing?

Thanks ahead of time

hbwhite
Posts: 12
Joined: Tue Feb 27, 2018 10:55 pm

Re: Interface Binding on Mac (New App!)

Postby hbwhite » Fri Dec 28, 2018 7:06 am

Yes, Clutch needs to know the name of the interface (for example, "utun0"). The interface IP address may change, but the name will stay the same. Clutch will bind Transmission to the interface's IP address and will automatically re-bind it if the IP address changes (which may happen if your connection drops or your VPN IP address changes).

This way, no packets are leaked outside of your VPN connection, and Transmission continues to work when your IP address changes.

To find out the name of your interface, open the dropdown menu in Clutch and take note of the interface names (you may have to scroll down to see them all). Then connect to your VPN, close and re-open Clutch, and look at the dropdown menu again. A new interface should show up that wasn't there the first time. This new interface is the one you want to bind to. Select it in the menu, click "Bind Transmission to Interface," and Clutch will do the rest. Let me know if this helps!

tikilab
Posts: 1
Joined: Sat Jan 26, 2019 8:59 am

Re: Interface Binding on Mac (New App!)

Postby tikilab » Sat Jan 26, 2019 9:02 am

A new interface should show up that wasn't there the first time. This new interface is the one you want to bind to.


What if three new lines show up? They all have the same "en2" bit at the beginning. Does it matter which one I choose?

Marc31
Posts: 47
Joined: Thu Dec 06, 2007 12:01 am

Re: Interface Binding on Mac (New App!)

Postby Marc31 » Tue Feb 19, 2019 10:12 pm

Not to rain on anyone’s parade, Transmission Interface Binder serves the purpose since virtually forever (apparently all to inconspicuously).
*∞ since 1984

rrossorr
Posts: 2
Joined: Tue Feb 19, 2019 11:28 pm

Re: Interface Binding on Mac (New App!)

Postby rrossorr » Tue Feb 19, 2019 11:51 pm

Harrison, Thanks. I've been looking for this functionality for quite some time, I poke around every year or so to see if this was added to Transmission and saw your post ;-). Installed and working perfectly. @tikilab, The "en" interfaces are the builtin Mac network interfaces (in Terminal, Run "/usr/sbin/networksetup -listallhardwareports" to list them with a description). VPN interfaces usually start with "utun" and will be the one associated with a IP (in Terminal run "ifconfig") ... That's the one you want to choose in Clutch.

Again .. Thanks for the app
Richard

hbwhite
Posts: 12
Joined: Tue Feb 27, 2018 10:55 pm

Re: Interface Binding on Mac (New App!)

Postby hbwhite » Thu Feb 28, 2019 6:11 am

Clutch v1.2 is now available:
https://mega.nz/#!2IAXUYJL!jN7EBqaT9mFQ ... GhfLqjxT9c

Version 1.2 adds support for Dark Mode in macOS Mojave and includes other improvements.

hbwhite
Posts: 12
Joined: Tue Feb 27, 2018 10:55 pm

Re: Interface Binding on Mac (New App!)

Postby hbwhite » Fri Mar 01, 2019 3:21 am

Clutch v1.3 is now available!

This version automatically checks for updates and allows you to update Clutch automatically within the app!

• It also fixes the issue found by @davids: Clutch now restarts Transmission if your binding interface disappears and reappears without changing its IP. This fixes an issue where Transmission would fail to bind to your VPN if it started before the interface was online (this could happen on boot if Transmission opened before your VPN started)

Download v1.3 here:
https://mega.nz/#!2BYHGYJS!TYZUOT01O2uT ... 5V9ZtJ8qW4


Return to “Mac Requests”