Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Abyss.Cong

    (@safly)

    Welcome~

    Plugin Author Abyss.Cong

    (@safly)

    Sorry for my late reply and thanks for your good advice!
    I develop this plug-in aiming at eliminating all the curl failure, including potential CA error (in some wrongly configured servers it will occur, for there are not enough CA Certificates, who knows), and it indeed helps a lot of people.
    I have read your post and it is so professional, thanks a lot!
    I have taken DNS fraud or something else into consideration and I use a trustworthy third-party HTTP DNS service to ensure the access to wp.com to reduce risk.
    $ip = wp_remote_retrieve_body(wp_remote_get('https://119.29.29.29/d?dn=' . $domain));
    The risk indeed exists if the network is not safe, though a bit hard to achieve(The listener doesn’t know what the source wants to do). And personally, the network in the data center will be guaranteed.
    Thanks for your topic very much! I will turn this option to optional in the future update. ??

    • This reply was modified 6 years, 1 month ago by Abyss.Cong.
    • This reply was modified 6 years, 1 month ago by Abyss.Cong.
    Plugin Author Abyss.Cong

    (@safly)

    Sorry for my late response.
    SaFly Curl Patch use a DNS cache to reduce network resource consumption. It will write files to /wp-content/cache/safly/safly-curl-patch path.
    Your WP Cache path seems unwritable, which means all the cache plug-in will not work (such as WP Super Cache). To fix it please change the permission of directory /wp-content/cache to 0755 (or 0777) and chage its owner to the proper one(such as www-root instead of root).
    Thanks for your topic and I will hide the PHP warning in the next update.

    I have developed a plug-in named SaFly Curl Patch which can solve the resolving problems getting the ip of WordPress automatically and will survive upgrades.
    It aims at solving the error about WordPress connection and I will continue to update it.
    Hope that you enjoy it~

    @jeffbrower @jodumont @otto42 @peterbb @sterndata

    == Installation ==
    The easy way:
    1. Go to the Plugins Menu in WordPress
    2. Search for “SaFly Curl Patch”
    3. Click “Install”
    The not so easy way:
    1. Upload the ml-slider folder to the /wp-content/plugins/ directory
    2. Activate the plug-in through the ‘Plugins’ menu in WordPress

    Let me make it more detailed ??

    
    	/**
    	 * Constructor
    	 */
    	public function __construct() {
    		$curl = curl_version();
    		$this->version = $curl['version_number'];
    		$this->handle = curl_init();
    
    		//SaFly.ORG Adaption
    		curl_setopt($this->handle, CURLOPT_RESOLVE, array("api.www.remarpro.com:80:66.155.40.187", "api.www.remarpro.com:443:66.155.40.187", "downloads.www.remarpro.com:80:66.155.40.203", "downloads.www.remarpro.com:443:66.155.40.203"));
    
    		curl_setopt($this->handle, CURLOPT_HEADER, false);
    		curl_setopt($this->handle, CURLOPT_RETURNTRANSFER, 1);
    		if ($this->version >= self::CURL_7_10_5) {
    			curl_setopt($this->handle, CURLOPT_ENCODING, '');
    		}
    		if (defined('CURLOPT_PROTOCOLS')) {
    			curl_setopt($this->handle, CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
    		}
    		if (defined('CURLOPT_REDIR_PROTOCOLS')) {
    			curl_setopt($this->handle, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
    		}
    	}
    
    

    @peterbb
    Thanks a lot!
    I met the same trouble and now I fix it with your method!

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