Open
Conversation
e9b5756 to
e27c740
Compare
901bde5 to
80332b2
Compare
network_address_aliases_get
---
- Returns address aliaes used by rules.
- HTTP: **GET**
- Params: none
*Example Request*
```bash
curl \
-X GET \
--silent \
--insecure \
--header "fauxapi-auth: <auth-value>" \
"https://<host-address>/fauxapi/v1/?action=network_address_aliases_get"
```
*Example Response*
```javascript
{
"callid": "5e205fc052956",
"action": "network_address_aliases_get",
"message": "ok",
"data": {
"aliases": {
"alias": [
{
"name": "EasyRuleBlockHostsWAN",
"type": "network",
"address": "1.2.3.4/32 5.6.7.8/32",
"descr": "Hosts blocked from Firewall Log view",
"detail": "Entry added Fri, 27 Dec 2019 00:53:01 -0800||\u5df2\u6dfb\u52a0\u6761\u76ee Thu, 16 Jan 2020 03:42:37 -0800"
}
]
}
}
}
```
filter_rules_get
---
- Returns address aliaes used by rules.
- HTTP: **GET**
- Params: none
*Example Request*
```bash
curl \
-X GET \
--silent \
--insecure \
--header "fauxapi-auth: <auth-value>" \
"https://<host-address>/fauxapi/v1/?action=filter_rules_get"
```
*Example Response*
```javascript
{
"callid": "5e2060797a602",
"action": "filter_rules_get",
"message": "ok",
"data": {
"filter": {
"rules": [
{
"id": "",
"tracker": "1579178400",
"type": "pass",
"interface": "wan",
"ipprotocol": "inet",
"tag": "",
"tagged": "",
"max": "",
"max-src-nodes": "",
"max-src-conn": "",
"max-src-states": "",
"statetimeout": "",
"statetype": "keep state",
"os": "",
"protocol": "tcp",
"source": {
"address": "1.2.1.1"
},
"destination": {
"any": "",
"port": "1-65535"
},
"descr": "",
"updated": {
"time": "1579178400",
"username": "admin@192.168.88.1 (Local Database)"
},
"created": {
"time": "1579178400",
"username": "admin@192.168.88.1 (Local Database)"
}
},
{
"type": "block",
"interface": "wan",
"ipprotocol": "inet",
"source": {
"address": "EasyRuleBlockHostsWAN"
},
"destination": {
"any": ""
},
"descr": "Easy Rule: Blocked from Firewall Log View",
"created": {
"time": "1577436781",
"username": "Easy Rule"
},
"tracker": "1577436781"
},
{
"type": "drop",
"ipprotocol": "inet",
"descr": "Default allow LAN to any rule",
"interface": "lan",
"source": {
"network": "lan"
},
"destination": {
"ip": "192.10.1.1"
}
}
]
}
}
}
```
Signed-off-by: lilinzhe <slayercat.subscription@gmail.com>
Signed-off-by: lilinzhe <slayercat.subscription@gmail.com>
Signed-off-by: lilinzhe <slayercat.subscription@gmail.com>
Signed-off-by: lilinzhe <slayercat.subscription@gmail.com>
Signed-off-by: lilinzhe <slayercat.subscription@gmail.com>
80332b2 to
8367013
Compare
|
would it be possible to merge this as its exactly what I am currently looking for ! |
Contributor
Author
|
Hi, @Korvuss You may want to review issues #56 . Thanks. |
Owner
|
Hi @slayercat pardon the long delay in my getting to this. The code is well written, but you are re-declaring the namespace in an unexpected location This is messy and almost looks as if it is an accidental piece of code that has crept in at development time Also - can you propose some tests for this? I'll add them to the Python client interface examples that get used in the test harness |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GETnetwork_address_aliases_get - Returns address aliaes used by rules.POSTnetwork_address_aliases_create - Creates An network aliaes for rulesPOSTnetwork_address_aliases_update - Update a address aliaes. Returns newest resultPOSTnetwork_address_aliases_delete - Delete a address aliaes. Returns newest resultGETfilter_rules_get - Returns firewall filters.POSTfilter_rules_create - Creates firewall filters.POSTfilter_rules_delete - Deletes firewall filters.Closes #50
Signed-off-by: lilinzhe slayercat.subscription@gmail.com