npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cloudflash-ffproxy

v1.3.4

Published

cloudflash-ffproxy module implements ffproxy configuration on cloudflash enabled devices

Downloads

30

Readme

cloudflash-ffproxy

List of ffproxy APIs

Create ffproxy policy

Verb      URI                    Description
POST      /ffproxy/policy        Create ffproxy policy configuration.

On success it returns JSON data with the UUID for the ffproxy policy created configuration.

Example Request and Response

Request JSON

{

"policy": [
    {
        "enable": true,
        "name": "policy name",
        "allowList": [
            1,
            2,
            3
        ],
        "blockedList": [
            4,
            5
        ],
        "net": [
            {
                "network": "10.1.10.1",
                "netmask": 32
            },
            {
                "network": "10.1.10.3",
                "netmask": 32
            }
        ]
    },
    {
          "enable": true,
          "name": "policy name 2",
        "allowList": [
            4,
            5
        ],
        "blockedList": [
            6,
            7
        ],
        "net": [
            {
                "network": "10.1.10.2",
                "netmask": 32
            }
        ]
    }
]
}

Response JSON

{
   
   "policy":
   [
       {
           "enable": true,
           "name": "policy name",
           "allowList":
           [
               1,
               2,
               3
           ],
           "blockedList":
           [
               4,
               5
           ],
           "net":
           [
               {
                   "network": "10.1.10.1",
                   "netmask": 32
               },
               {
                   "network": "10.1.10.3",
                   "netmask": 32
               }
           ]
       },
       {
           "enable": true,
           "name": "policy name 2",
           "allowList":
           [
               4,
               5
           ],
           "blockedList":
           [
               6,
               7
           ],
           "net":
           [
               {
                   "network": "10.1.10.2",
                   "netmask": 32
               }
           ]
       }
   ],
   "id": "89a81ef3-99bf-4a60-b9c8-f7abfa7cc428"
}

List ffproxy policy

Verb	URI	             Description
GET	       /ffproxy/policy       List summary of ffproxy policy configuration.

Example Request and Response

Response

[
   {
       "policy":
       [
           {
               "enable": true,
               "name": "policy name",
               "allowList":
               [
                   1,
                   2,
                   3
               ],
               "blockedList":
               [
                   4,
                   5
               ],
               "net":
               [
                   {
                       "network": "10.1.10.1",
                       "netmask": 32
                   },
                   {
                       "network": "10.1.10.3",
                       "netmask": 32
                   }
               ]
           },
           {
               "enable": true,
               "name": "policy name 2",
               "allowList":
               [
                   4,
                   5
               ],
               "blockedList":
               [
                   6,
                   7
               ],
               "net":
               [
                   {
                       "network": "10.1.10.2",
                       "netmask": 32
                   }
               ]
           }
       ],
       "id": "89a81ef3-99bf-4a60-b9c8-f7abfa7cc428"
   }
]

List ffproxy policy by ID

Verb	URI	                Description
GET	       /ffproxy/policy/:id	List summary of ffproxy policy configured by ID.

Example Request and Response

Response

{
   
   "policy":
   [
       {
           "enable": true,
           "name": "policy name",
           "allowList":
           [
               1,
               2,
               3
           ],
           "blockedList":
           [
               4,
               5
           ],
           "net":
           [
               {
                   "network": "10.1.10.1",
                   "netmask": 32
               },
               {
                   "network": "10.1.10.3",
                   "netmask": 32
               }
           ]
       },
       {
           "enable": true,
           "name": "policy name 2",
           "allowList":
           [
               4,
               5
           ],
           "blockedList":
           [
               6,
               7
           ],
           "net":
           [
               {
                   "network": "10.1.10.2",
                   "netmask": 32
               }
           ]
       }
   ],
   "id": "89a81ef3-99bf-4a60-b9c8-f7abfa7cc428"
}

Update ffproxy policy

Verb	URI	              Description
PUT 	/ffproxy/policy/:id   update ffproxy policy configuration by ID.

On success it returns JSON data with the UUID for the ffproxy policy created configuration.

Example Request and Response

Request JSON

{

"policy": [
    {
        "enable": true,
        "name": "policy name1",
        "allowList": [
            1,
            2,
            3
        ],
        "blockedList": [
            4,
            5
        ],
        "net": [
            {
                "network": "10.1.10.1",
                "netmask": 32
            },
            {
                "network": "10.1.10.3",
                "netmask": 32
            }
        ]
    },
    {
        "enable": true,
        "name": "policy name 2",
        "allowList": [
            4,
            5
        ],
        "blockedList": [
            6,
            7
        ],
        "net": [
            {
                "network": "10.1.10.2",
                "netmask": 32
            }
        ]
    }
]
}

Response JSON

{
   
   "policy":
   [
       {
           "enable": true,
           "name": "policy name1",
           "allowList":
           [
               1,
               2,
               3
           ],
           "blockedList":
           [
               4,
               5
           ],
           "net":
           [
               {
                   "network": "10.1.10.1",
                   "netmask": 32
               },
               {
                   "network": "10.1.10.3",
                   "netmask": 32
               }
           ]
       },
       {
           "enable": true,
           "name": "policy name 2",
           "allowList":
           [
               4,
               5
           ],
           "blockedList":
           [
               6,
               7
           ],
           "net":
           [
               {
                   "network": "10.1.10.2",
                   "netmask": 32
               }
           ]
       }
   ],
   "id": "89a81ef3-99bf-4a60-b9c8-f7abfa7cc428"
}

DELETE policy

Verb      URI                            Description
DELETE   /ffproxy/policy/:id           Delete existing ffproxy policy configuration by ID.

Example Request and Response

Request Headers

DELETE /ffproxy/policy/d8fc22ff-3024-4937-bf18-cfbca8010e34

Response Header

Status Code : 204

Create ffproxy categories

Verb	URI	              Description
POST	/ffproxy/categories     Create ffproxy categories configuration.

On success it returns JSON data with the UUID for the ffproxy categories created configuration.

Example Request and Response

Request JSON

{
"categories": [
    {
        "categoryNumber": 42,
        "name": "test",
        "description": "test desc",
        "urls": [
            "test",
            "test1"
        ],
        "custom": true
    },
    {
        "categoryNumber": 43,
        "name": "test",
        "description": "test desc",
        "urls": [
            "test",
            "test1"
        ],
        "custom": true
    }
]
}

Response JSON

{
   "categories":
   [
       {
           "categoryNumber": 42,
           "name": "test",
           "description": "test desc",
           "urls":
           [
               "test",
               "test1"
           ],
           "custom": true
       },
       {
           "categoryNumber": 43,
           "name": "test",
           "description": "test desc",
           "urls":
           [
               "test",
               "test1"
           ],
           "custom": true
       }
   ],
   "id": "afbdb284-a18a-41b9-b057-b641fd5d108c"
}

List ffproxy categories

Verb	URI	               Description
GET	       /ffproxy/categories       List summary of ffproxy categories configuration.

Example Request and Response

Response

[
   {
       "categories":
       [
           {
               "categoryNumber": 42,
               "name": "test",
               "description": "test desc",
               "urls":
               [
                   "test",
                   "test1"
               ],
               "custom": true
           },
           {
               "categoryNumber": 43,
               "name": "test",
               "description": "test desc",
               "urls":
               [
                   "test",
                   "test1"
               ],
               "custom": true
           }
       ],
       "id": "afbdb284-a18a-41b9-b057-b641fd5d108c"
   }
]

List ffproxy categories by ID

Verb	URI	                Description
GET	       /ffproxy/categories/:id	List summary of ffproxy categories configured by ID.

Example Request and Response

Response

{
   "categories":
   [
       {
           "categoryNumber": 42,
           "name": "test",
           "description": "test desc",
           "urls":
           [
               "test",
               "test1"
           ],
           "custom": true
       },
       {
           "categoryNumber": 43,
           "name": "test",
           "description": "test desc",
           "urls":
           [
               "test",
               "test1"
           ],
           "custom": true
       }
   ],
   "id": "afbdb284-a18a-41b9-b057-b641fd5d108c"
}

Update ffproxy categories

Verb	URI	              Description
PUT	      /ffproxy/categories/:id   update ffproxy categories configuration by ID.

On success it returns JSON data with the UUID for the ffproxy categories created configuration.

Example Request and Response

Request JSON

{
"categories": [
    {
        "categoryNumber": 42,
        "name": "test",
        "description": "test desc updated",
        "urls": [
            "test",
            "test1"
        ],
        "custom": true
    },
    {
        "categoryNumber": 43,
        "name": "test",
        "description": "test desc",
        "urls": [
            "test",
            "test1"
        ],
        "custom": true
    }
]
}

Response JSON

{
   "categories":
   [
       {
           "categoryNumber": 42,
           "name": "test",
           "description": "test desc updated",
           "urls":
           [
               "test",
               "test1"
           ],
           "custom": true
       },
       {
           "categoryNumber": 43,
           "name": "test",
           "description": "test desc",
           "urls":
           [
               "test",
               "test1"
           ],
           "custom": true
       }
   ],
   "id": "afbdb284-a18a-41b9-b057-b641fd5d108c"
}

DELETE categories

Verb      URI                          Description
DELETE   /ffproxy/categories/:id         Delete existing ffproxy categories configuration by ID.

Example Request and Response

Request Headers

DELETE /ffproxy/categories/488ef428-a495-4eac-817f-37d0f2bac363

Response Header

Status Code : 204

Safesearch

Verb      URI                       Description
POST     /ffproxy/safesearch        safesearch  configuration.

On success it returns JSON data with the UUID for the safesearch created configuration.

Example Request and Response

Request JSON

{
   "safesearch":
   {
       "enable": false
   }
   
}

Response JSON

{
   "safesearch":
   {
       "enable": false
   },
   "id": "3cef41a7-f960-465f-8fb0-9c724ed43fa1"
}

GET List

Verb       URI	                    Description
GET	       /ffproxy/safesearch    	List summary of safesearch configured.

Example Request and Response

Response JSON

[
   {
       "safesearch":
       {
           "enable": false
       },
       "id": "3cef41a7-f960-465f-8fb0-9c724ed43fa1"
   }
]

GET by ID:

Verb       URI                          Description
GET	       /ffproxy/safesearch/:id    	List summary of safesearch configured by ID.

Example Request and Response

Response JSON

{
   "safesearch":
   {
       "enable": false
   },
   "id": "3cef41a7-f960-465f-8fb0-9c724ed43fa1"
}

PUT API

Verb       URI                          Description
PUT	       /ffproxy/safesearch/:id    	Update safesearch configuration.

Example Request and Response

Request JSON

{
   "safesearch":
   {
       "enable": true
   }
   
}

Response JSON

{
   "safesearch":
   {
       "enable": true
   },
   "id": "3cef41a7-f960-465f-8fb0-9c724ed43fa1"
}

DELETE safesearch configuration

Verb      URI                            Description
DELETE   /ffproxy/safesearch/:id         Delete existing safesearch configuration by ID.

Example Request and Response

Request Headers

DELETE /ffproxy/safesearch/265875ff-643f-47b8-bd1c-23b35e5bda8e

Response Header

Status Code : 204

Exceptions

Verb      URI                       Description
POST     /ffproxy/policyexceptions        exceptions  configuration.

On success it returns JSON data with the UUID for the exceptions created configuration.

Example Request and Response

Request JSON

{
"policyexceptions": [
    {
        "name": "Default Policy exceptions",
        "custom": false,
        "whitelist": [
            "test1",
            "test2"
        ],
        "net": [
            {
                "network": "0.0.0.0",
                "netmask": 0
            }
        ]
    },
    {
        "name": "Default Policy exceptions",
        "custom": false,
        "blacklist": [
            "test3",
            "test4"
        ],
        "net": [
            {
                "network": "0.0.0.0",
                "netmask": 0
            }
        ]
    }
]
}

Response JSON

{
   "policyexceptions":
   [
       {
           "name": "Default Policy exceptions",
           "custom": false,
           "whitelist":
           [
               "test1",
               "test2"
           ],
           "net":
           [
               {
                   "network": "0.0.0.0",
                   "netmask": 0
               }
           ]
       },
       {
           "name": "Default Policy exceptions",
           "custom": false,
           "blacklist":
           [
               "test3",
               "test4"
           ],
           "net":
           [
               {
                   "network": "0.0.0.0",
                   "netmask": 0
               }
           ]
       }
   ],
   "id": "6efee6eb-cfc2-4465-b2b7-999316d1af1e"
}

GET List

Verb       URI	                    Description
GET	       /ffproxy/policyexceptions    	List summary of exceptions configured.

Example Request and Response

Response JSON

[       
   {
   "policyexceptions":
   [
       {
           "name": "Default Policy exceptions",
           "custom": false,
           "whitelist":
           [
               "test1",
               "test2"
           ],
           "net":
           [
               {
                   "network": "0.0.0.0",
                   "netmask": 0
               }
           ]
       },
       {
           "name": "Default Policy exceptions",
           "custom": false,
           "blacklist":
           [
               "test3",
               "test4"
           ],
           "net":
           [
               {
                   "network": "0.0.0.0",
                   "netmask": 0
               }
           ]
       }
   ],
   "id": "6efee6eb-cfc2-4465-b2b7-999316d1af1e"
}
]

GET by ID:

Verb       URI                          Description
GET	       /ffproxy/policyexceptions/:id    	List summary of exception configured by ID.

Example Request and Response

Response JSON

{
   "policyexceptions":
   [
       {
           "name": "Default Policy exceptions",
           "custom": false,
           "whitelist":
           [
               "test1",
               "test2"
           ],
           "net":
           [
               {
                   "network": "0.0.0.0",
                   "netmask": 0
               }
           ]
       },
       {
           "name": "Default Policy exceptions",
           "custom": false,
           "blacklist":
           [
               "test3",
               "test4"
           ],
           "net":
           [
               {
                   "network": "0.0.0.0",
                   "netmask": 0
               }
           ]
       }
   ],
   "id": "6efee6eb-cfc2-4465-b2b7-999316d1af1e"
}

PUT API

Verb       URI                          Description
PUT	       /ffproxy/policyexceptions/:id    	Update exception configuration.

Example Request and Response

Request JSON

{
"policyexceptions": [
    {
        "name": "Default Policy exceptions",
        "custom": false,
        "whitelist": [
            "test11",
            "test21"
        ],
        "net": [
            {
                "network": "0.0.0.0",
                "netmask": 0
            }
        ]
    },
    {
        "name": "Default Policy exceptions",
        "custom": false,
        "blacklist": [
            "test31",
            "test41"
        ],
        "net": [
            {
                "network": "0.0.0.0",
                "netmask": 0
            }
        ]
    }
]
}	

Response JSON

{
   "policyexceptions":
   [
       {
           "name": "Default Policy exceptions",
           "custom": false,
           "whitelist":
           [
               "test11",
               "test21"
           ],
           "net":
           [
               {
                   "network": "0.0.0.0",
                   "netmask": 0
               }
           ]
       },
       {
           "name": "Default Policy exceptions",
           "custom": false,
           "blacklist":
           [
               "test31",
               "test41"
           ],
           "net":
           [
               {
                   "network": "0.0.0.0",
                   "netmask": 0
               }
           ]
       }
   ],
   "id": "6efee6eb-cfc2-4465-b2b7-999316d1af1e"
}

DELETE exception configuration

Verb      URI                            Description
DELETE   /ffproxy/policyexceptions/:id         Delete existing exception configuration by ID.

Example Request and Response

Request Headers

DELETE /ffproxy/policyexceptions/6efee6eb-cfc2-4465-b2b7-999316d1af1e

Response Header

Status Code : 204