• Resolved bkawamura

    (@bkawamura)


    Hello,

    When I try to generate an API key I get an error
    Sucuri: Something went wrong with an API call (register_site action): couldn’t connect to host

    Our firewall is blocking outbound 443.Is there a way of using our proxy server to go get the API key? I do not see any settings for a proxy in the plugin.

    I sent a note to [email protected] asking for an API key. I was told to address the issue in the forum.

    https://ww.wp.xz.cn/plugins/sucuri-scanner/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Generally I recommend to send the domain and email for the generation of the key to that address and ask one of my co-workers to forward the email to me so I can create a key for the website. To reduce the back and forth I will not tell you that because you were already redirected here.

    Have you tried to deactivate the SSL verification? There is an option in the plugin’ general settings page with the name “API request with SSL”, if you deactivate this it will force the plugin to send all the HTTP requests to the API service through “http” instead of “https”.

    Let me know if this works for you.

    Thread Starter bkawamura

    (@bkawamura)

    Yorman,
    Thanks for the advice. However it did not work. Our firewall rules do not allow outbound requests. This is to prevent beaconing.I need to be able to make the outgoing request through our proxy server.

    I understand, however the current version of the code does not supports proxies, but that is a good feature that I will add to the list of feature requests for the next version of the plugin. For now you will have to deactivate the plugin until the options to configure the API calls through a proxy are fully implemented, I will keep this ticket open until then.

    Actually I think this is not necessary, I ran some tests and was able to pass the API calls of the plugin through a proxy simply setting the constants that WordPress supports for tunnels. This worked correctly for me even with the SSL peer verification enabled.

    define( 'WP_PROXY_HOST', '127.0.0.1' );
    define( 'WP_PROXY_PORT', '8080' );
    define( 'WP_PROXY_USERNAME', 'foobar' );
    define( 'WP_PROXY_PASSWORD', 'lorem_ipsum' );

    While most of the features can be set using the options or using filters, the proxy implementation relies on constants and thus will need to be set manually in the “wp-config.php”. Of course, there could be and might already be a plugin that will allow you to configure it in the WordPress administration panels. [1]

    Let me know if this setup works for you, if not I will need to implement an independent HTTP request interface for the plugin just to allow connections through a proxy, but I believe this is redundant considering that WordPress already offers support for that.

    [1] http://codex.ww.wp.xz.cn/HTTP_API

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Can't generate API key II’ is closed to new replies.