Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set proxy through setting.json in JetBrains Toolbox?

When I click change proxy setting button on this app, it will crash. And I realize that I can set proxy through settings.json. But in this file it shows like below.

{
    "autostart": true,
    "install_location": "D:/Jetbrains/ToolBox",
    "privacy_policy": {
        "eua_accepted_version": "1.1"
    },
    "proxy": null
    "shell_scripts": {
        "enabled": false
    },
    "statistics": {
        "allow": true
    },
    "update": {
        "filter": {
            "quality_filter": {
                "order_value": 10000
            }
        }
    }
}

I got no idea about proxy:null, there is no sample to help me figure out how to set proxy through json. So what's the right properties about proxy in this file? Could anybody give a sample?

like image 723
vainman Avatar asked Oct 17 '18 08:10

vainman


1 Answers

It takes a dictionary where the keys are the same variable names you'd define in your shell and the values are the values you'd assign them. For instance http_proxy, https_proxy, no_proxy. Here is an example of what I have in my settings.json:

"proxy": {
    "http_proxy": "http://my.proxy.url:8888",
    "https_proxy": "http://my.proxy.url:8888",
    "no_proxy": "localhost,127.0.0.1,localaddress,.localdomain.com"
},

I also tried manually editing the .desktop file's Exec line by adding the proxy environmental variables and while that works the first launch, the .desktop file is overwritten each time the application is launched so it won't work on subsequent launches and won't work if you have the application launch on login. Setting the proxy in the settings.json is the only way to make it work without manual intervention every time it's launched.

This is not documented anywhere that I could find and I wasted way more time than I'd liek to admit before I tried this solution. I'm glad it was as simple as it is but how hard would that be to document? It may seem intuitive, but how often have we all been burned by something where the intuitive and logical answer was not the actual implementation.

like image 109
xarmy9 Avatar answered Oct 04 '22 03:10

xarmy9