Plugin Directory

Changeset 2971206

Timestamp:
09/25/2023 10:26:45 AM (10 months ago)
Author:
khorshidlab
Message:

Plugin Version 0.9.10

Location:
arvancloud-cdn
Files:
10 edited
1 copied

Legend:

Unmodified
Added
Removed
  • arvancloud-cdn/tags/0.9.10/README.txt

    r2962918 r2971206  
    55Tested up to: 6.1
    66Requires PHP: 7.2
    7 Stable tag: 0.9.9
     7Stable tag: 0.9.
    88License: GPLv3 or later
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    5656
    5757== Changelog ==
     58
     59
     60
    5861= 0.9.9 - 2023-09-05 =
    5962* Fix Arvan API changes in domain info response
  • arvancloud-cdn/tags/0.9.10/admin/inc/Security/class-ddos_protection.php

    r2777664 r2971206  
    4343        // should send request to arvancloud
    4444       
    45         $endpoint   = '/ddos';
     45        $endpoint   = '/ddos';
    4646
    4747        if ($item['name'] == 'ttl') {
     
    5151        if ( $item['name'] == 'ddos_protection_mode' ) {
    5252            $data = array(
    53                 "mode" => $item['value'],
     53                "mode" => $item['value'],
    5454            );
    5555        } else {
     
    115115        $domain = Helper::get_site_domain();
    116116
    117         return Request_Arvan::get("domains/$domain/ddos");
     117        return Request_Arvan::get("domains/$domain/ddos");
    118118    }
    119119
    120120    public function get_mode() {
    121121        $options = self::get_options();
    122         $this->ttl = $options['ttl'] ?? false;
    123122
    124         return $options['mode'] ?? false;
     123        $this->ttl = $options['ttl'] ?? false;
     124
     125        return $options['protection_mode'] ?? false;
     126    }
     127
     128    public function get_ddos_settings(){
     129        $domain = Helper::get_site_domain();
     130
     131        return Request_Arvan::get("domains/$domain/ddos/settings");
     132    }
     133    public function get_status(){
     134        $settings = $this->get_ddos_settings();
     135
     136        return $settings['is_enabled'] ?? false;
    125137    }
    126138}
  • arvancloud-cdn/tags/0.9.10/admin/inc/Security/class-firewall.php

    r2943546 r2971206  
    191191    public static function get_firewall_config() {
    192192        $domain = Helper::get_site_domain();
    193 
    194         return Request_Arvan::get("domains/$domain/firewall");
     193        return Request_Arvan::get("domains/$domain/firewall/settings");
    195194    }
    196195
     
    200199        $this->default_rule = $this->data['default_action'];
    201200        $this->verify_sni   = $this->data['verify_sni'];
    202         $this->rules        = $this->data['rules'];
    203     }
    204 
     201        $this->rules        = $this->get_rules();
     202
     203    }
     204
     205
     206    public function get_rules(){
     207        $domain = Helper::get_site_domain();
     208        $rules = Request_Arvan::get("domains/$domain/firewall/rules");
     209        if(isset($rules['status_code']))
     210            unset($rules['status_code']);
     211        return $rules;
     212    }
    205213    /**
    206214     * @param $status
  • arvancloud-cdn/tags/0.9.10/admin/views/security/firewall_settings.php

    r2752685 r2971206  
    1212    <h1><?php esc_html_e('Firewall', 'arvancloud-cdn'); ?></h1>
    1313    <?php
    14     if ( $cdn_plan_level == 1 && count($firewall->rules) == 10)
     14    if ( $cdn_plan_level == 1 && count($firewall->rules) == 10)
    1515        echo wp_kses_post('<div class="notice notice-error is-dismissible"><p>'. esc_html__( 'You have reached the limit for the number of rules (10 rules) you can create at Basic plan. Check the Plans page for upgrades and more information.', 'arvancloud-cdn' ) .'</p></div>');
    1616    ?>
  • arvancloud-cdn/tags/0.9.10/wp-arvancloud-cdn.php

    r2962918 r2971206  
    1111 * Plugin URI:        https://www.arvancloud.ir/fa/products/cdn
    1212 * Description:       ArvanCloud CDN service caches your website content. Using this plugin, you will be able to purge and update the cached version, either manually or automatically, so that your users visit the latest version of your website at any time.
    13  * Version:           0.9.9
     13 * Version:           0.9.
    1414 * Requires PHP:      7.2
    1515 * Author:            Khorshid, ArvanCloud
     
    2727
    2828
    29 define( 'ACCDN_VERSION', '0.9.9' );
     29define( 'ACCDN_VERSION', '0.9.' );
    3030define( 'ACCDN_NAME', __( 'ArvanCloud CDN', 'arvancloud-cdn' ) );
    3131define( 'ACCDN_SLUG', 'arvancloud-cdn');
  • arvancloud-cdn/trunk/README.txt

    r2962918 r2971206  
    55Tested up to: 6.1
    66Requires PHP: 7.2
    7 Stable tag: 0.9.9
     7Stable tag: 0.9.
    88License: GPLv3 or later
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    5656
    5757== Changelog ==
     58
     59
     60
    5861= 0.9.9 - 2023-09-05 =
    5962* Fix Arvan API changes in domain info response
  • arvancloud-cdn/trunk/admin/inc/Security/class-ddos_protection.php

    r2777664 r2971206  
    4343        // should send request to arvancloud
    4444       
    45         $endpoint   = '/ddos';
     45        $endpoint   = '/ddos';
    4646
    4747        if ($item['name'] == 'ttl') {
     
    5151        if ( $item['name'] == 'ddos_protection_mode' ) {
    5252            $data = array(
    53                 "mode" => $item['value'],
     53                "mode" => $item['value'],
    5454            );
    5555        } else {
     
    115115        $domain = Helper::get_site_domain();
    116116
    117         return Request_Arvan::get("domains/$domain/ddos");
     117        return Request_Arvan::get("domains/$domain/ddos");
    118118    }
    119119
    120120    public function get_mode() {
    121121        $options = self::get_options();
    122         $this->ttl = $options['ttl'] ?? false;
    123122
    124         return $options['mode'] ?? false;
     123        $this->ttl = $options['ttl'] ?? false;
     124
     125        return $options['protection_mode'] ?? false;
     126    }
     127
     128    public function get_ddos_settings(){
     129        $domain = Helper::get_site_domain();
     130
     131        return Request_Arvan::get("domains/$domain/ddos/settings");
     132    }
     133    public function get_status(){
     134        $settings = $this->get_ddos_settings();
     135
     136        return $settings['is_enabled'] ?? false;
    125137    }
    126138}
  • arvancloud-cdn/trunk/admin/inc/Security/class-firewall.php

    r2943546 r2971206  
    191191    public static function get_firewall_config() {
    192192        $domain = Helper::get_site_domain();
    193 
    194         return Request_Arvan::get("domains/$domain/firewall");
     193        return Request_Arvan::get("domains/$domain/firewall/settings");
    195194    }
    196195
     
    200199        $this->default_rule = $this->data['default_action'];
    201200        $this->verify_sni   = $this->data['verify_sni'];
    202         $this->rules        = $this->data['rules'];
    203     }
    204 
     201        $this->rules        = $this->get_rules();
     202
     203    }
     204
     205
     206    public function get_rules(){
     207        $domain = Helper::get_site_domain();
     208        $rules = Request_Arvan::get("domains/$domain/firewall/rules");
     209        if(isset($rules['status_code']))
     210            unset($rules['status_code']);
     211        return $rules;
     212    }
    205213    /**
    206214     * @param $status
  • arvancloud-cdn/trunk/admin/views/security/firewall_settings.php

    r2752685 r2971206  
    1212    <h1><?php esc_html_e('Firewall', 'arvancloud-cdn'); ?></h1>
    1313    <?php
    14     if ( $cdn_plan_level == 1 && count($firewall->rules) == 10)
     14    if ( $cdn_plan_level == 1 && count($firewall->rules) == 10)
    1515        echo wp_kses_post('<div class="notice notice-error is-dismissible"><p>'. esc_html__( 'You have reached the limit for the number of rules (10 rules) you can create at Basic plan. Check the Plans page for upgrades and more information.', 'arvancloud-cdn' ) .'</p></div>');
    1616    ?>
  • arvancloud-cdn/trunk/wp-arvancloud-cdn.php

    r2962918 r2971206  
    1111 * Plugin URI:        https://www.arvancloud.ir/fa/products/cdn
    1212 * Description:       ArvanCloud CDN service caches your website content. Using this plugin, you will be able to purge and update the cached version, either manually or automatically, so that your users visit the latest version of your website at any time.
    13  * Version:           0.9.9
     13 * Version:           0.9.
    1414 * Requires PHP:      7.2
    1515 * Author:            Khorshid, ArvanCloud
     
    2727
    2828
    29 define( 'ACCDN_VERSION', '0.9.9' );
     29define( 'ACCDN_VERSION', '0.9.' );
    3030define( 'ACCDN_NAME', __( 'ArvanCloud CDN', 'arvancloud-cdn' ) );
    3131define( 'ACCDN_SLUG', 'arvancloud-cdn');
Note: See TracChangeset for help on using the changeset viewer.