Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12

Thread: Proxy settings disabled on macOS

  1. #1
    Senior Member
    Join Date
    Aug 2015
    Posts
    254

    Question Proxy settings disabled on macOS

    Not sure if this a bug or expected behaviour but I can't modify the proxy settings when running on macOS.
    All the controls on the page are disabled including the enable checkbox.
    Manually setting the values for
    Code:
    http.proxyHost=
    http.proxyPassword
    http.proxyPort=
    http.proxyUser
    https.proxyHost=
    https.proxyPassword
    https.proxyPort=
    https.proxyUser
    in GLOBAL_prefs.txt likewise does nothing.

    I can't set Java proxy settings on macOS directly as the Java control panel is no longer a thing as of Java 11

    Any help in my endeavour to play KoL when I'm supposed to be working is greatly appreciated

  2. #2
    Senior Member
    Join Date
    Apr 2018
    Posts
    303

    Default

    In the interim, I recommend using a system-wide proxy, possibly even Tor. There’s no kill like overkill.

  3. #3
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    Central Virginia, USA
    Posts
    4,430

    Default

    The GUI elements behave as expected for me in Windows. I might toggle proxySet between start and restart and see if something changes but it sounds like something has changed that has an effect on the GUI and I have no idea where I would begin.

    Have you tried editing globals to have the values you want and proxySet to be true? If it is merely a GUI issue KoLmafia should use the values.

    I would check your employeer's IT policies. I have worked in environments where getting caught using TOR or a global proxy on a machine was grounds for immediate dismissal and the level of monitoring and network topology allowed for some chance of getting caught.

  4. #4

    Default

    Code:
    			if ( System.getProperty( "os.name" ).startsWith( "Mac" ) )
    			{
    				this.optionBoxes[ 0 ].setSelected( proxySet );
    				this.optionBoxes[ 0 ].setEnabled( false );
    			}
    So it is intentionally disabled for Macs. I have no idea why that was, or if it makes any sense.

    I see that
    Code:
    global	http.proxyHost
    global	http.proxyPassword
    global	http.proxyPort
    global	http.proxyUser
    global	https.proxyHost
    global	https.proxyPassword
    global	https.proxyPort
    global	https.proxyUser
    appear to be all of the potentially-relevant settings.

  5. #5
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    Central Virginia, USA
    Posts
    4,430

    Default

    Duh. I was assuming this was something that had stopped working.

    Edited to add something useful:

    Looking at the code it looks like KoLmafia punts everything related to a proxy on a Mac to the global Java properties. So if you want to use a proxy on a Mac you need to set them.

    If you can't set them any other way the -D command line switch is the way to go.

    java -Dhttp.proxyHost=127.0.0.1 -Dhttp.proxyPort=3128 etc...
    Last edited by fronobulax; 05-07-2019 at 03:48 PM.

  6. #6
    Senior Member
    Join Date
    Apr 2018
    Posts
    303

    Default

    I mean, you can use bridges to circumvent such monitoring, but it is still probably worth asking on principle. And rethinking whether you should be playing KoL at work, to be honest.

  7. #7
    Senior Member
    Join Date
    Aug 2015
    Posts
    254

    Default

    Code:
    			if ( System.getProperty( "os.name" ).startsWith( "Mac" ) )
    			{
    				this.optionBoxes[ 0 ].setSelected( proxySet );
    				this.optionBoxes[ 0 ].setEnabled( false );
    			}
    So it is intentionally disabled for Macs. I have no idea why that was, or if it makes any sense.

    I see that
    Code:
    global	http.proxyHost
    global	http.proxyPassword
    global	http.proxyPort
    global	http.proxyUser
    global	https.proxyHost
    global	https.proxyPassword
    global	https.proxyPort
    global	https.proxyUser
    appear to be all of the potentially-relevant settings.
    Originally Posted by lostcalpolydude View Post
    Could it be changed to not be disabled on macOS so I can test it?

    If you can't set them any other way the -D command line switch is the way to go.

    java -Dhttp.proxyHost=127.0.0.1 -Dhttp.proxyPort=3128 etc...
    Originally Posted by fronobulax View Post
    Tried that already, requires the full JDK installed on macOS not just the JRE which I'd rather not unless absolutely necessary.

    In the interim, I recommend using a system-wide proxy, possibly even Tor. There’s no kill like overkill.
    Originally Posted by Saklad5 View Post
    I mean, you can use bridges to circumvent such monitoring, but it is still probably worth asking on principle. And rethinking whether you should be playing KoL at work, to be honest.
    Originally Posted by Saklad5 View Post
    Yeah now I see why the consensus is what it is around these parts. Sometimes it takes a while to come around the same point of view as the group but I guess it happens eventually.

  8. #8
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    Central Virginia, USA
    Posts
    4,430

    Default

    If no one else does I can comment the lines out and post a jar file for you but it won't happen immediately. I note that the code dates back to hola and 2006 and 2012 so there may have been a MacOS issue with proxies that is no longer the case, but I am unwilling to change the codebase without more understanding and testing on this point.

    I played KoL at work when I could. I didn't play when I couldn't. The ethics really depend upon your job and your employer. In the most extreme case I worked in, games on corporate equipment were prohibited and grounds for dismissal. Attempting to circumvent that policy was also grounds for dismissal. All traffic was monitored and if VPN or bridge or proxy use was detected it was deemed as "circumventing". Accessing the equipment in that environment required explicit consent to monitoring and if potentially circumventing traffic was observed a keystroke logger was installed to see what was going on (and detection algorithms possibly enhanced as a result). If your cubicle mate was concerned about what you were doing a logger was also a possibility. So I am a firm believer in playing by the rules (because I am not smart enough to get around them) and working to change them when they got in the way of doing my job. Tangentially, these policies were not in place just to keep employee's noses to the grindstone but the folks doing enforcement spent more time dealing with attempted access to games, gambling and porn than anything else.

  9. #9
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    Central Virginia, USA
    Posts
    4,430

    Default

    Code:
    			//if ( System.getProperty( "os.name" ).startsWith( "Mac" ) )
    			//{
    			//	this.optionBoxes[ 0 ].setSelected( proxySet );
    			//	this.optionBoxes[ 0 ].setEnabled( false );
    			//}
    			//else
    			//{
    				proxySet |= Preferences.getBoolean( "proxySet" );
    				this.optionBoxes[ 0 ].setSelected( proxySet );
    			//}
    https://www.dropbox.com/s/f8a3lbi8jj...9208M.jar?dl=0

    I'll delete the file in a few days.
    Well, thank you.
    Originally Posted by Veracity View Post

  10. #10
    Senior Member
    Join Date
    Aug 2015
    Posts
    254

    Default

    Code:
    			//if ( System.getProperty( "os.name" ).startsWith( "Mac" ) )
    			//{
    			//	this.optionBoxes[ 0 ].setSelected( proxySet );
    			//	this.optionBoxes[ 0 ].setEnabled( false );
    			//}
    			//else
    			//{
    				proxySet |= Preferences.getBoolean( "proxySet" );
    				this.optionBoxes[ 0 ].setSelected( proxySet );
    			//}
    https://www.dropbox.com/s/f8a3lbi8jj...9208M.jar?dl=0

    I'll delete the file in a few days.
    Originally Posted by fronobulax View Post
    Thanks, I'll give it a test on Monday (tomorrow).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •