2023-04-01, 02:06
my code:
someone help me get this to work please
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