-
Notifications
You must be signed in to change notification settings - Fork 111
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
Add macOS support #96
base: master
Are you sure you want to change the base?
Conversation
Create some kind of interface for different OSes: Main functions for setting proxies are split into different files for each OS which contain identical function names. The corresponding file gets sourced at the beginning of the file.
BSD readlink has a different functionality than GNU's readlink. We need to use realpath on macOS.
BSD sed's syntax is different from the GNU one. We check for the OS in the unset function and call the corresponding sed syntax
also removed unnecessary hashtag also added networksetup entry to do_all function
...because this function is not implemented yet.
in networksetup.sh -> set_proxy()
This was a copy and paste error
macOS does not come with realpath per default, so we need a portable substitute for this
I tried the macOS version on another machine today. Turns out, that |
Thanks a lot @deg0nz I'm sorry for not responding. There has been some delay from my end as I had been occupied. |
No problem, take your time :) |
Okay, I fixed the problem with the From my perspective, this is ready to merge now. |
Has this feature been merged? Does proxyman support macos now? |
@FatehAK I'm using this for almost a year now and it seems to be working fine. I would also be happy if someone else could test this :) |
It works perfectly @deg0nz. I've used it for the past few days haven't faced any issues. |
Just FYI: Me and my colleagues are using this for almost 2 years now without any problems. I think it can be considered stable |
I added the support for macOS for ProxyMan. I created this PR so we can discuss some stuff about the implementation.
For now, the following things are implemented:
source
ing corresponding OS-related file to have the right functions for each OS in placenetworksetup
as mentioned in Add MacOS networksetup proxy configuration options. #11 )npm
/yarn
andgit
are untouched since they are identical to Linuxapt
,docker
, ...) are ignored in the macOS-partWhat's missing:
networksetup
proxy configurations. To make this pretty, there is need for some data aggregation to be made, sincenetworksetup
is a bit chatty about that. A simple print for all network devices would be too much. So I left that part out for now.networksetup
are system-wideTo be done/discussed before merging:
main_macos.sh
andmain_linux.sh
) because they can cause confusion by the user (one could think that those are themain.sh
to be executed for the corresponding OS). I will change this to something that makes more sense for this scenario.networksetup
throws an error when setting proxy settings with user credentials:networksetup[71185:16035891] error -25299 attempting to create account and password for proxy
, but credentials actually get updated in the system and work. Maybe this is a keychain-issue... But I think we can ignore that for the first version.