HTTP API - Socks5 Proxy: Difference between revisions

From Ultiroam User Docs
Jump to navigation Jump to search
(Created page with "=== 9.1         Request === '''POST <nowiki>https://gateway_ip/api/socks5_proxy</nowiki>''' 9.2         '''Request Parameter''' {| class="wikitable" |'''Parameter''' |'''Type''' |'''Description''' |- | colspan="3" |'''Required Parameter''' |- |port |Interger | |- |state |String |It could be “on” or “off”. Use “on” to enable socks5 proxy on this port. Use “off” to disable socks5 proxy on this port. |} == 9.3         Response Paramet...")
 
No edit summary
Tag: 2017 source edit
Line 1: Line 1:
=== 9.1         Request ===
'''POST <nowiki>http://gateway_ip/api/socks5_proxy</nowiki>'''   
'''POST <nowiki>https://gateway_ip/api/socks5_proxy</nowiki>'''   


9.2         '''Request Parameter'''  
'''Request Parameters:'''  


{| class="wikitable"
{| class="wikitable"
Line 22: Line 21:
|}   
|}   


== 9.3         Response Parameter ==  
== Response Parameters: ==  
{| class="wikitable"
{| class="wikitable"
|'''Parameter'''
|'''Parameter'''
Line 45: Line 44:
|}  
|}  


=== 9.4         Example ===
Example:
 
====== Request: ======
 


'''Request:'''
curl -k --anyauth -u admin:admin -d '{"port":0,"state":"on"}' -H  "Content-Type: application/json" <nowiki>https://gateway_ip/api/socks5_proxy</nowiki>
curl -k --anyauth -u admin:admin -d '{"port":0,"state":"on"}' -H  "Content-Type: application/json" <nowiki>https://gateway_ip/api/socks5_proxy</nowiki>
 
Response:
====== Response: ======
{"error_code":200,"sn":"xxxx-xxxx-xxxx-xxxx","socks_port":1080}
{"error_code":200,"sn":"xxxx-xxxx-xxxx-xxxx","socks_port":1080}

Revision as of 07:53, 8 May 2024

POST http://gateway_ip/api/socks5_proxy

Request Parameters:

Parameter Type Description
Required Parameter
port Interger
state String It could be “on” or “off”.

Use “on” to enable socks5 proxy on this port. Use “off” to disable socks5 proxy on this port.

Response Parameters:

Parameter Type Description
error_code Integer Codes that may be returned: 200: MMS has been sent.

400:Bad request. 500: other errors

503: failed

sn String SN of the gateway
socks_port Interger socks proxy port for this request.

Example:

Request: curl -k --anyauth -u admin:admin -d '{"port":0,"state":"on"}' -H  "Content-Type: application/json" https://gateway_ip/api/socks5_proxy Response: {"error_code":200,"sn":"xxxx-xxxx-xxxx-xxxx","socks_port":1080}