AutoDialer 0.2.3__tar.gz → 0.2.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {autodialer-0.2.3/src/AutoDialer.egg-info → autodialer-0.2.4}/PKG-INFO +16 -44
- autodialer-0.2.3/README.MD → autodialer-0.2.4/README.md +16 -44
- {autodialer-0.2.3 → autodialer-0.2.4}/pyproject.toml +1 -1
- {autodialer-0.2.3 → autodialer-0.2.4/src/AutoDialer.egg-info}/PKG-INFO +16 -44
- {autodialer-0.2.3 → autodialer-0.2.4}/src/AutoDialer.egg-info/SOURCES.txt +7 -2
- {autodialer-0.2.3 → autodialer-0.2.4}/src/autodialer/__init__.py +1 -1
- {autodialer-0.2.3 → autodialer-0.2.4}/src/autodialer/apis/routers/asus/asus_api.py +2 -1
- {autodialer-0.2.3 → autodialer-0.2.4}/src/autodialer/apis/routers/tplink/tplink_api.py +2 -2
- autodialer-0.2.4/src/autodialer/apis/routers/zte/zte_api.py +434 -0
- autodialer-0.2.4/src/autodialer/apis/utils/check_vendor.py +122 -0
- autodialer-0.2.4/src/autodialer/config/__init__.py +0 -0
- autodialer-0.2.4/src/autodialer/encode/zte_encode.py +9 -0
- autodialer-0.2.4/tests/test_check_vendor.py +125 -0
- autodialer-0.2.4/tests/test_zte_api.py +450 -0
- autodialer-0.2.3/src/autodialer/apis/utils/check_vendor.py +0 -69
- {autodialer-0.2.3 → autodialer-0.2.4}/LICENSE +0 -0
- {autodialer-0.2.3 → autodialer-0.2.4}/setup.cfg +0 -0
- {autodialer-0.2.3 → autodialer-0.2.4}/src/AutoDialer.egg-info/dependency_links.txt +0 -0
- {autodialer-0.2.3 → autodialer-0.2.4}/src/AutoDialer.egg-info/entry_points.txt +0 -0
- {autodialer-0.2.3 → autodialer-0.2.4}/src/AutoDialer.egg-info/requires.txt +0 -0
- {autodialer-0.2.3 → autodialer-0.2.4}/src/AutoDialer.egg-info/top_level.txt +0 -0
- {autodialer-0.2.3 → autodialer-0.2.4}/src/autodialer/apis/__init__.py +0 -0
- {autodialer-0.2.3 → autodialer-0.2.4}/src/autodialer/apis/routers/__init__.py +0 -0
- {autodialer-0.2.3 → autodialer-0.2.4}/src/autodialer/apis/routers/asus/__init__.py +0 -0
- {autodialer-0.2.3 → autodialer-0.2.4}/src/autodialer/apis/routers/base_api.py +0 -0
- {autodialer-0.2.3 → autodialer-0.2.4}/src/autodialer/apis/routers/tplink/__init__.py +0 -0
- {autodialer-0.2.3/src/autodialer/config → autodialer-0.2.4/src/autodialer/apis/routers/zte}/__init__.py +0 -0
- {autodialer-0.2.3 → autodialer-0.2.4}/src/autodialer/apis/utils/check_isp.py +0 -0
- {autodialer-0.2.3 → autodialer-0.2.4}/src/autodialer/apis/utils/get_gateway.py +0 -0
- {autodialer-0.2.3 → autodialer-0.2.4}/src/autodialer/apis/utils/get_vendor_api.py +0 -0
- {autodialer-0.2.3 → autodialer-0.2.4}/src/autodialer/apis/utils/is_target_asn.py +0 -0
- {autodialer-0.2.3 → autodialer-0.2.4}/src/autodialer/apis/utils/print_devices_table.py +0 -0
- {autodialer-0.2.3 → autodialer-0.2.4}/src/autodialer/config/config.py +0 -0
- {autodialer-0.2.3 → autodialer-0.2.4}/src/autodialer/encode/__init__.py +0 -0
- {autodialer-0.2.3 → autodialer-0.2.4}/src/autodialer/encode/tplink_security_encode.py +0 -0
- {autodialer-0.2.3 → autodialer-0.2.4}/src/autodialer/get_devices.py +0 -0
- {autodialer-0.2.3 → autodialer-0.2.4}/src/autodialer/reconnection.py +0 -0
- {autodialer-0.2.3 → autodialer-0.2.4}/tests/test_asus_api.py +0 -0
- {autodialer-0.2.3 → autodialer-0.2.4}/tests/test_check_isp.py +0 -0
- {autodialer-0.2.3 → autodialer-0.2.4}/tests/test_get_gateway.py +0 -0
- {autodialer-0.2.3 → autodialer-0.2.4}/tests/test_get_vendor_api.py +0 -0
- {autodialer-0.2.3 → autodialer-0.2.4}/tests/test_pppoe.py +0 -0
- {autodialer-0.2.3 → autodialer-0.2.4}/tests/test_reconnection.py +0 -0
- {autodialer-0.2.3 → autodialer-0.2.4}/tests/test_tplink_api.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: AutoDialer
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4
|
|
4
4
|
Summary: AutoDialer is an automation script designed to interact with routers using APIs.
|
|
5
5
|
Author-email: Byte Flow <fakeshadow1337@gmail.com>
|
|
6
6
|
License-Expression: GPL-3.0-only
|
|
@@ -23,52 +23,23 @@ Requires-Dist: requests<3
|
|
|
23
23
|
Dynamic: license-file
|
|
24
24
|
|
|
25
25
|
# AutoDialer
|
|
26
|
-
|
|
26
|
+

|
|
27
27
|
AutoDialer is a cross-platform Python CLI package for router APIs, designed to rotate public IP addresses automatically and streamline router interactions.
|
|
28
28
|
|
|
29
29
|
## Why AutoDialer?
|
|
30
30
|
- Convenient IP rotation on dynamic lines without manual router reboot.
|
|
31
|
-
- Cross-platform (Windows, Linux, macOS,
|
|
31
|
+
- Cross-platform (Windows, Linux, macOS, BSD).
|
|
32
32
|
- CLI-first usage for scripts and automation.
|
|
33
33
|
|
|
34
34
|
## Installation
|
|
35
35
|
|
|
36
|
-
### Using pip (recommended)
|
|
37
36
|
```bash
|
|
38
37
|
pip install autodialer
|
|
39
38
|
```
|
|
40
39
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
```bash
|
|
45
|
-
# install from PyPI
|
|
46
|
-
uv tool install autodialer
|
|
47
|
-
|
|
48
|
-
# run directly
|
|
49
|
-
autodialer
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
For local development:
|
|
53
|
-
|
|
54
|
-
```bash
|
|
55
|
-
uv sync
|
|
56
|
-
uv pip install -e .
|
|
57
|
-
uv run autodialer --help
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
### From source (development)
|
|
61
|
-
```bash
|
|
62
|
-
python -m venv .venv
|
|
63
|
-
|
|
64
|
-
# Windows (PowerShell)
|
|
65
|
-
. .\.venv\Scripts\Activate.ps1
|
|
66
|
-
|
|
67
|
-
# Linux/macOS
|
|
68
|
-
source .venv/bin/activate
|
|
69
|
-
|
|
70
|
-
python -m pip install -e .
|
|
71
|
-
```
|
|
40
|
+
## Notes
|
|
41
|
+
- **Only** TP-Link, ZTE and ASUS routers are supported now.
|
|
42
|
+
- Keep `.env` private and never commit credentials.
|
|
72
43
|
|
|
73
44
|
## Configuration
|
|
74
45
|
|
|
@@ -78,9 +49,9 @@ Create a `.env` file in your working directory:
|
|
|
78
49
|
| :--- | :--- |
|
|
79
50
|
| `PANEL_USERNAME` | Router panel username (defaults to `admin`) |
|
|
80
51
|
| `PANEL_PASSWORD` | Router panel password |
|
|
81
|
-
| `PPPOE_USERNAME` | ISP PPPoE username (optional
|
|
82
|
-
| `PPPOE_PASSWORD` | ISP PPPoE password (optional
|
|
83
|
-
| `ASN` |
|
|
52
|
+
| `PPPOE_USERNAME` | ISP PPPoE username override (optional) |
|
|
53
|
+
| `PPPOE_PASSWORD` | ISP PPPoE password override (optional) |
|
|
54
|
+
| `ASN` | Optional library-level default ASN. The CLI currently expects the ASN to be passed explicitly with `--asn <ASN>`. |
|
|
84
55
|
|
|
85
56
|
Example:
|
|
86
57
|
```bash
|
|
@@ -96,10 +67,9 @@ ASN='AS9929'
|
|
|
96
67
|
After installation, use the CLI directly:
|
|
97
68
|
|
|
98
69
|
```bash
|
|
99
|
-
autodialer
|
|
100
70
|
autodialer --force
|
|
101
71
|
autodialer --asn AS9929
|
|
102
|
-
autodialer-devices
|
|
72
|
+
autodialer-devices
|
|
103
73
|
```
|
|
104
74
|
|
|
105
75
|
Arguments:
|
|
@@ -107,15 +77,17 @@ Arguments:
|
|
|
107
77
|
- `-a`, `--asn`: target ASN (for example `AS9929` or `9929`).
|
|
108
78
|
|
|
109
79
|
Behavior:
|
|
80
|
+
- `autodialer` currently requires either `--force` or `--asn <ASN>`.
|
|
110
81
|
- AutoDialer detects current WAN protocol and applies matching reconnection action.
|
|
111
82
|
- PPPoE uses disconnect/connect flow and reuses the router's saved credentials by default.
|
|
112
83
|
- If `PPPOE_USERNAME` and `PPPOE_PASSWORD` are set, AutoDialer updates the router's PPPoE config before reconnecting.
|
|
113
84
|
- DHCP uses DHCP renew flow and shares the same ASN/check/retry control logic.
|
|
114
|
-
- ASUSWRT routers use panel authentication plus WAN restart through the ASUS web API.
|
|
115
85
|
|
|
116
|
-
##
|
|
117
|
-
|
|
118
|
-
-
|
|
86
|
+
## Documentation
|
|
87
|
+
|
|
88
|
+
- Setup and CLI details: [`docs/getting-started.md`](docs/en/docs/getting-started.md)
|
|
89
|
+
- Detection and reconnection flow: [`docs/how-it-works.md`](docs/en/docs/how-it-works.md)
|
|
90
|
+
- Contribution guide: [`CONTRIBUTING.md`](CONTRIBUTING.md)
|
|
119
91
|
|
|
120
92
|
---
|
|
121
93
|
Thanks for using AutoDialer.
|
|
@@ -1,50 +1,21 @@
|
|
|
1
1
|
# AutoDialer
|
|
2
|
-
|
|
2
|
+

|
|
3
3
|
AutoDialer is a cross-platform Python CLI package for router APIs, designed to rotate public IP addresses automatically and streamline router interactions.
|
|
4
4
|
|
|
5
5
|
## Why AutoDialer?
|
|
6
6
|
- Convenient IP rotation on dynamic lines without manual router reboot.
|
|
7
|
-
- Cross-platform (Windows, Linux, macOS,
|
|
7
|
+
- Cross-platform (Windows, Linux, macOS, BSD).
|
|
8
8
|
- CLI-first usage for scripts and automation.
|
|
9
9
|
|
|
10
10
|
## Installation
|
|
11
11
|
|
|
12
|
-
### Using pip (recommended)
|
|
13
12
|
```bash
|
|
14
13
|
pip install autodialer
|
|
15
14
|
```
|
|
16
15
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
# install from PyPI
|
|
22
|
-
uv tool install autodialer
|
|
23
|
-
|
|
24
|
-
# run directly
|
|
25
|
-
autodialer
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
For local development:
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
uv sync
|
|
32
|
-
uv pip install -e .
|
|
33
|
-
uv run autodialer --help
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
### From source (development)
|
|
37
|
-
```bash
|
|
38
|
-
python -m venv .venv
|
|
39
|
-
|
|
40
|
-
# Windows (PowerShell)
|
|
41
|
-
. .\.venv\Scripts\Activate.ps1
|
|
42
|
-
|
|
43
|
-
# Linux/macOS
|
|
44
|
-
source .venv/bin/activate
|
|
45
|
-
|
|
46
|
-
python -m pip install -e .
|
|
47
|
-
```
|
|
16
|
+
## Notes
|
|
17
|
+
- **Only** TP-Link, ZTE and ASUS routers are supported now.
|
|
18
|
+
- Keep `.env` private and never commit credentials.
|
|
48
19
|
|
|
49
20
|
## Configuration
|
|
50
21
|
|
|
@@ -54,9 +25,9 @@ Create a `.env` file in your working directory:
|
|
|
54
25
|
| :--- | :--- |
|
|
55
26
|
| `PANEL_USERNAME` | Router panel username (defaults to `admin`) |
|
|
56
27
|
| `PANEL_PASSWORD` | Router panel password |
|
|
57
|
-
| `PPPOE_USERNAME` | ISP PPPoE username (optional
|
|
58
|
-
| `PPPOE_PASSWORD` | ISP PPPoE password (optional
|
|
59
|
-
| `ASN` |
|
|
28
|
+
| `PPPOE_USERNAME` | ISP PPPoE username override (optional) |
|
|
29
|
+
| `PPPOE_PASSWORD` | ISP PPPoE password override (optional) |
|
|
30
|
+
| `ASN` | Optional library-level default ASN. The CLI currently expects the ASN to be passed explicitly with `--asn <ASN>`. |
|
|
60
31
|
|
|
61
32
|
Example:
|
|
62
33
|
```bash
|
|
@@ -72,10 +43,9 @@ ASN='AS9929'
|
|
|
72
43
|
After installation, use the CLI directly:
|
|
73
44
|
|
|
74
45
|
```bash
|
|
75
|
-
autodialer
|
|
76
46
|
autodialer --force
|
|
77
47
|
autodialer --asn AS9929
|
|
78
|
-
autodialer-devices
|
|
48
|
+
autodialer-devices
|
|
79
49
|
```
|
|
80
50
|
|
|
81
51
|
Arguments:
|
|
@@ -83,15 +53,17 @@ Arguments:
|
|
|
83
53
|
- `-a`, `--asn`: target ASN (for example `AS9929` or `9929`).
|
|
84
54
|
|
|
85
55
|
Behavior:
|
|
56
|
+
- `autodialer` currently requires either `--force` or `--asn <ASN>`.
|
|
86
57
|
- AutoDialer detects current WAN protocol and applies matching reconnection action.
|
|
87
58
|
- PPPoE uses disconnect/connect flow and reuses the router's saved credentials by default.
|
|
88
59
|
- If `PPPOE_USERNAME` and `PPPOE_PASSWORD` are set, AutoDialer updates the router's PPPoE config before reconnecting.
|
|
89
60
|
- DHCP uses DHCP renew flow and shares the same ASN/check/retry control logic.
|
|
90
|
-
- ASUSWRT routers use panel authentication plus WAN restart through the ASUS web API.
|
|
91
61
|
|
|
92
|
-
##
|
|
93
|
-
|
|
94
|
-
-
|
|
62
|
+
## Documentation
|
|
63
|
+
|
|
64
|
+
- Setup and CLI details: [`docs/getting-started.md`](docs/en/docs/getting-started.md)
|
|
65
|
+
- Detection and reconnection flow: [`docs/how-it-works.md`](docs/en/docs/how-it-works.md)
|
|
66
|
+
- Contribution guide: [`CONTRIBUTING.md`](CONTRIBUTING.md)
|
|
95
67
|
|
|
96
68
|
---
|
|
97
|
-
Thanks for using AutoDialer.
|
|
69
|
+
Thanks for using AutoDialer.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name = "AutoDialer"
|
|
3
3
|
authors = [{name = "Byte Flow", email = "fakeshadow1337@gmail.com"}]
|
|
4
4
|
description = "AutoDialer is an automation script designed to interact with routers using APIs."
|
|
5
|
-
readme = "README.
|
|
5
|
+
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.10"
|
|
7
7
|
license = "GPL-3.0-only"
|
|
8
8
|
dynamic = ["version"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: AutoDialer
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4
|
|
4
4
|
Summary: AutoDialer is an automation script designed to interact with routers using APIs.
|
|
5
5
|
Author-email: Byte Flow <fakeshadow1337@gmail.com>
|
|
6
6
|
License-Expression: GPL-3.0-only
|
|
@@ -23,52 +23,23 @@ Requires-Dist: requests<3
|
|
|
23
23
|
Dynamic: license-file
|
|
24
24
|
|
|
25
25
|
# AutoDialer
|
|
26
|
-
|
|
26
|
+

|
|
27
27
|
AutoDialer is a cross-platform Python CLI package for router APIs, designed to rotate public IP addresses automatically and streamline router interactions.
|
|
28
28
|
|
|
29
29
|
## Why AutoDialer?
|
|
30
30
|
- Convenient IP rotation on dynamic lines without manual router reboot.
|
|
31
|
-
- Cross-platform (Windows, Linux, macOS,
|
|
31
|
+
- Cross-platform (Windows, Linux, macOS, BSD).
|
|
32
32
|
- CLI-first usage for scripts and automation.
|
|
33
33
|
|
|
34
34
|
## Installation
|
|
35
35
|
|
|
36
|
-
### Using pip (recommended)
|
|
37
36
|
```bash
|
|
38
37
|
pip install autodialer
|
|
39
38
|
```
|
|
40
39
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
```bash
|
|
45
|
-
# install from PyPI
|
|
46
|
-
uv tool install autodialer
|
|
47
|
-
|
|
48
|
-
# run directly
|
|
49
|
-
autodialer
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
For local development:
|
|
53
|
-
|
|
54
|
-
```bash
|
|
55
|
-
uv sync
|
|
56
|
-
uv pip install -e .
|
|
57
|
-
uv run autodialer --help
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
### From source (development)
|
|
61
|
-
```bash
|
|
62
|
-
python -m venv .venv
|
|
63
|
-
|
|
64
|
-
# Windows (PowerShell)
|
|
65
|
-
. .\.venv\Scripts\Activate.ps1
|
|
66
|
-
|
|
67
|
-
# Linux/macOS
|
|
68
|
-
source .venv/bin/activate
|
|
69
|
-
|
|
70
|
-
python -m pip install -e .
|
|
71
|
-
```
|
|
40
|
+
## Notes
|
|
41
|
+
- **Only** TP-Link, ZTE and ASUS routers are supported now.
|
|
42
|
+
- Keep `.env` private and never commit credentials.
|
|
72
43
|
|
|
73
44
|
## Configuration
|
|
74
45
|
|
|
@@ -78,9 +49,9 @@ Create a `.env` file in your working directory:
|
|
|
78
49
|
| :--- | :--- |
|
|
79
50
|
| `PANEL_USERNAME` | Router panel username (defaults to `admin`) |
|
|
80
51
|
| `PANEL_PASSWORD` | Router panel password |
|
|
81
|
-
| `PPPOE_USERNAME` | ISP PPPoE username (optional
|
|
82
|
-
| `PPPOE_PASSWORD` | ISP PPPoE password (optional
|
|
83
|
-
| `ASN` |
|
|
52
|
+
| `PPPOE_USERNAME` | ISP PPPoE username override (optional) |
|
|
53
|
+
| `PPPOE_PASSWORD` | ISP PPPoE password override (optional) |
|
|
54
|
+
| `ASN` | Optional library-level default ASN. The CLI currently expects the ASN to be passed explicitly with `--asn <ASN>`. |
|
|
84
55
|
|
|
85
56
|
Example:
|
|
86
57
|
```bash
|
|
@@ -96,10 +67,9 @@ ASN='AS9929'
|
|
|
96
67
|
After installation, use the CLI directly:
|
|
97
68
|
|
|
98
69
|
```bash
|
|
99
|
-
autodialer
|
|
100
70
|
autodialer --force
|
|
101
71
|
autodialer --asn AS9929
|
|
102
|
-
autodialer-devices
|
|
72
|
+
autodialer-devices
|
|
103
73
|
```
|
|
104
74
|
|
|
105
75
|
Arguments:
|
|
@@ -107,15 +77,17 @@ Arguments:
|
|
|
107
77
|
- `-a`, `--asn`: target ASN (for example `AS9929` or `9929`).
|
|
108
78
|
|
|
109
79
|
Behavior:
|
|
80
|
+
- `autodialer` currently requires either `--force` or `--asn <ASN>`.
|
|
110
81
|
- AutoDialer detects current WAN protocol and applies matching reconnection action.
|
|
111
82
|
- PPPoE uses disconnect/connect flow and reuses the router's saved credentials by default.
|
|
112
83
|
- If `PPPOE_USERNAME` and `PPPOE_PASSWORD` are set, AutoDialer updates the router's PPPoE config before reconnecting.
|
|
113
84
|
- DHCP uses DHCP renew flow and shares the same ASN/check/retry control logic.
|
|
114
|
-
- ASUSWRT routers use panel authentication plus WAN restart through the ASUS web API.
|
|
115
85
|
|
|
116
|
-
##
|
|
117
|
-
|
|
118
|
-
-
|
|
86
|
+
## Documentation
|
|
87
|
+
|
|
88
|
+
- Setup and CLI details: [`docs/getting-started.md`](docs/en/docs/getting-started.md)
|
|
89
|
+
- Detection and reconnection flow: [`docs/how-it-works.md`](docs/en/docs/how-it-works.md)
|
|
90
|
+
- Contribution guide: [`CONTRIBUTING.md`](CONTRIBUTING.md)
|
|
119
91
|
|
|
120
92
|
---
|
|
121
93
|
Thanks for using AutoDialer.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
LICENSE
|
|
2
|
-
README.
|
|
2
|
+
README.md
|
|
3
3
|
pyproject.toml
|
|
4
4
|
src/AutoDialer.egg-info/PKG-INFO
|
|
5
5
|
src/AutoDialer.egg-info/SOURCES.txt
|
|
@@ -17,6 +17,8 @@ src/autodialer/apis/routers/asus/__init__.py
|
|
|
17
17
|
src/autodialer/apis/routers/asus/asus_api.py
|
|
18
18
|
src/autodialer/apis/routers/tplink/__init__.py
|
|
19
19
|
src/autodialer/apis/routers/tplink/tplink_api.py
|
|
20
|
+
src/autodialer/apis/routers/zte/__init__.py
|
|
21
|
+
src/autodialer/apis/routers/zte/zte_api.py
|
|
20
22
|
src/autodialer/apis/utils/check_isp.py
|
|
21
23
|
src/autodialer/apis/utils/check_vendor.py
|
|
22
24
|
src/autodialer/apis/utils/get_gateway.py
|
|
@@ -27,10 +29,13 @@ src/autodialer/config/__init__.py
|
|
|
27
29
|
src/autodialer/config/config.py
|
|
28
30
|
src/autodialer/encode/__init__.py
|
|
29
31
|
src/autodialer/encode/tplink_security_encode.py
|
|
32
|
+
src/autodialer/encode/zte_encode.py
|
|
30
33
|
tests/test_asus_api.py
|
|
31
34
|
tests/test_check_isp.py
|
|
35
|
+
tests/test_check_vendor.py
|
|
32
36
|
tests/test_get_gateway.py
|
|
33
37
|
tests/test_get_vendor_api.py
|
|
34
38
|
tests/test_pppoe.py
|
|
35
39
|
tests/test_reconnection.py
|
|
36
|
-
tests/test_tplink_api.py
|
|
40
|
+
tests/test_tplink_api.py
|
|
41
|
+
tests/test_zte_api.py
|
|
@@ -7,6 +7,7 @@ from urllib.parse import quote
|
|
|
7
7
|
|
|
8
8
|
import requests
|
|
9
9
|
|
|
10
|
+
from autodialer.apis.routers.base_api import RouterAPI
|
|
10
11
|
from autodialer.apis.utils.get_gateway import format_ip_for_url_host, get_gateway_ip
|
|
11
12
|
from autodialer.config.config import PANEL_PASSWORD, PANEL_USERNAME
|
|
12
13
|
|
|
@@ -23,7 +24,7 @@ MAC_ADDRESS_PATTERN = re.compile(r"^(?:[0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}$")
|
|
|
23
24
|
logger = logging.getLogger(__name__)
|
|
24
25
|
|
|
25
26
|
|
|
26
|
-
class AsusAPI:
|
|
27
|
+
class AsusAPI(RouterAPI):
|
|
27
28
|
"""Interact with ASUSWRT routers using the web API."""
|
|
28
29
|
|
|
29
30
|
SUPPORTED_VENDORS = ("ASUS", "ASUS AiMesh")
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import logging
|
|
2
2
|
import requests
|
|
3
3
|
from autodialer import encode
|
|
4
|
-
|
|
4
|
+
from autodialer.apis.routers.base_api import RouterAPI
|
|
5
5
|
from autodialer.apis.utils.get_gateway import format_ip_for_url_host, get_gateway_ip
|
|
6
6
|
from time import sleep
|
|
7
7
|
from typing import Literal
|
|
@@ -16,7 +16,7 @@ logger = logging.getLogger(__name__)
|
|
|
16
16
|
"""
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
class TPLinkAPI:
|
|
19
|
+
class TPLinkAPI(RouterAPI):
|
|
20
20
|
"""A class to interact with TP-Link routers using their API.
|
|
21
21
|
|
|
22
22
|
Attributes:
|