JetpackDuba / Gitnuro

A FOSS Git multiplatform client for newbies and pros
https://gitnuro.com/
GNU General Public License v3.0
946 stars 46 forks source link

Proxy support #113

Closed dertuxmalwieder closed 1 year ago

dertuxmalwieder commented 1 year ago

Ahoy,

I think Gitnuro is a pretty fine software, especially for people like me who try to avoid Git's atrocious default command-line "user experience" as much as possible. However, it seems that Gitnuro does not respect the system's default proxy (nor Git's configured proxy). My office is behind a proxy and it just can't connect; and there does not seem to be an option to change that...?

JetpackDuba commented 1 year ago

Hey!

What OS are you using?

dertuxmalwieder commented 1 year ago

On this system, Windows 10.

JetpackDuba commented 1 year ago

Then it would have to be coded.

I can add the feature and ask you to test it, if you don't mind waiting a few days. Obvioulsy it wouldn't be the stable release, more like release v1.3.1-alpha01.

The alternative would be building it yourself from the source code once I add it.

dertuxmalwieder commented 1 year ago

I could live with both options. I won't be on Windows until next week anymore.

JetpackDuba commented 1 year ago

Sorry, I've been sick so I haven't been able to work on it as I'd have liked to.

I'm also concerned about some security implications of storing the proxy information in plain text, so I'd like to think more about it.

If you really need it urgently, you can try to clone gitnuro and hardcode the proxy config inside main.kt.

You may simply want to add this line System.setProperty("java.net.useSystemProxies", "true") to use the system proxy. In case that doesn't work or you don't want to use the system settings, there is the option to set other properties with the values you want. This stackoverflow post may help .

This should be placed above the App initialization https://github.com/JetpackDuba/Gitnuro/blob/main/src/main/kotlin/com/jetpackduba/gitnuro/main.kt#LL10C1-L10C1