what is the correct json to set a http proxy in both kodi 18.9 and kodi 19+
#1
my code:

python:

def set_proxy():
    payload = {
        "jsonrpc": "2.0",
        "method": "Settings.SetSettingValue",
        "params": {
            "setting": "network.proxy.type",
            "value": "1"  # 1 = Proxy HTTP, 2 = Proxy SOCKS4, 3 = Proxy SOCKS5
        },
        "id": 1
    }
    xbmc.executeJSONRPC(json.dumps(payload))
    payload = {
        "jsonrpc": "2.0",
        "method": "Settings.SetSettingValue",
        "params": {
            "setting": "network.proxy.server",
            "value": "127.0.0.1:8888"
        },
        "id": 2
    }
    xbmc.executeJSONRPC(json.dumps(payload))
    payload = {
        "jsonrpc": "2.0",
        "method": "Settings.SetSettingValue",
        "params": {
            "setting": "network.proxy.enabled",
            "value": True
        },
        "id": 3
    }
    xbmc.executeJSONRPC(json.dumps(payload))
set_proxy()

​​​​​​​someone help me get this to work please
Reply

Logout Mark Read Team Forum Stats Members Help
what is the correct json to set a http proxy in both kodi 18.9 and kodi 19+0