The method allows to retrieve proxies according to the given parameters. 该方法允许根据给定的参数查询代理。

    Parameters 参数

    (object) Parameters defining the desired output. (object)定义所需输出的参数。

    The method supports the following parameters. 此方法支持一下参数

    (integer/array) Returns either:

    • the count of retrieved objects, if the countOutput parameter has been used.

    • 一个对象数组

    • 搜索到对象的数量,如果对象被使用

    Examples 示例如下

    Retrieve all proxies 检索所有的代理

    Retrieve all configured proxies and their interfaces. 检索所有配置的代理和他们的接口

    Response:

    1. {
    2. "jsonrpc": "2.0",
    3. "result": [
    4. {
    5. "host": "Active proxy",
    6. "status": "5",
    7. "lastaccess": "0",
    8. "proxyid": "30091",
    9. "description": "",
    10. "tls_connect": "1",
    11. "tls_accept": "1",
    12. "tls_issuer": "",
    13. "tls_subject": "",
    14. "tls_psk_identity": "",
    15. "tls_psk": ""
    16. {
    17. "interface": {
    18. "interfaceid": "30109",
    19. "useip": "1",
    20. "ip": "127.0.0.1",
    21. "dns": "",
    22. "port": "10051"
    23. ],
    24. "host": "Passive proxy",
    25. "status": "6",
    26. "lastaccess": "0",
    27. "proxyid": "30092",
    28. "description": ""
    29. }
    30. ],
    31. }

    Source

    CProxy::get() in frontends/php/include/classes/api/services/CProxy.php.