Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
firstred committed Dec 24, 2018
0 parents commit 35d0291
Show file tree
Hide file tree
Showing 27 changed files with 1,709 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.idea/
vendor/

composer.lock

*.key
*.env
*.pem

test*
*.zip

7 changes: 7 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Copyright (c) 2018-2019 Michael Dekker

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Cloudflare DNS Extension for Plesk 17.8+
![Cloudflare](cloudflareplesk.png)

![Cloudflare settings](src/_meta/screenshots/1.png)

## Requirements
- PHP 7.1+
- Plesk 17.8 or higher
- One or more domains hosted with Cloudflare and API access

## How to install

- Navigate to the releases tab: https://github.com/firstred/plesk-cloudflare/releases/latest
- Download the extension
- Add the following to your [panel.ini](https://docs.plesk.com/en-US/onyx/administrator-guide/plesk-administration/panelini-configuration-file.78509/) file:

```
[ext-catalog]
extensionUpload = true
```
This makes sure that you can upload extension on the extension page.
- Navigate to the `Extensions` page, then `My Extensions`. Here you can upload the extension zip.
- Cloudflare should now be visible in your extension list.

## How to configure

The module needs your Cloudflare email and an API key to use for the API.
You can generate a new private key in your Cloudflare Config Panel.

## How to build

Install the dependencies first with composer. Unlike a regular composer package the `vendor` folder
can be found in the subdirectory `src/plib`. This is the folder that eventually ends up on Plesk.
Packing up the `src/plib` folder is enough to upload the module.
This is what an extension's file structure should
look like: https://docs.plesk.com/en-US/onyx/extensions-guide/plesk-extensions-basics/extension-structure.71076/
50 changes: 50 additions & 0 deletions cloudflare.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cloudflareplesk.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "firstred/plesk-cloudflare",
"description": "Cloudflare DNS connector for Plesk",
"require": {
"php": "^7.1",
"ext-json": "*",
"ext-curl": "*"
},
"license": "MIT",
"authors": [
{
"name": "Michael Dekker",
"email": "[email protected]"
}
],
"require-dev": {
}
}
4 changes: 4 additions & 0 deletions src/_meta/descriptions/en-US.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
This extension integrates Plesk with Cloudflare DNS, so you can:

- Synchronize all DNS zones information between Plesk and Cloudflare name servers at once.
- Push DNS updates automatically to Cloudflare.
4 changes: 4 additions & 0 deletions src/_meta/descriptions/nl-NL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Deze extensie integreert Plesk met Cloudflare DNS, zodat je:

- alle informatie van DNS-zones tussen Plesk en Cloudflare kunt synchroniseren.
- DNS updates automatisch kunt versturen naar Cloudflare.
Binary file added src/_meta/icons/128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/_meta/icons/32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/_meta/icons/64x64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/_meta/screenshots/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/_meta/screenshots/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions src/htdocs/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php
/**
* Copyright 2018-2019 Michael Dekker
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge,
* publish, distribute, sublicense, and/or sell copies of the Software,
* and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*
* @copyright 2018-2019 Michael Dekker
* @author Michael Dekker <[email protected]>
* @license MIT
*/

pm_Context::init('cloudflaredns');

$application = new pm_Application();
$application->run();
15 changes: 15 additions & 0 deletions src/meta.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2018-2019. Michael Dekker. -->
<module>
<id>cloudflaredns</id>
<name>Cloudflare DNS</name>
<description>This extension does a one-way sync of Plesk's DNS settings to Cloudflare.</description>
<category>dns</category>
<version>1.0</version>
<release>0</release>
<vendor>Michael Dekker</vendor>
<url>https://github.com/firstred/plesk-cloudflare</url>
<plesk_min_version>17.8</plesk_min_version>
<!--Localized descriptions below-->
<description xml:lang="nl-NL">Deze extensie stuurt Plesk's DNS-instellingen naar Cloudflare.</description>
</module>
Loading

0 comments on commit 35d0291

Please sign in to comment.