iptime-cli 0.1.0__tar.gz → 0.1.2__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.
- iptime_cli-0.1.2/PKG-INFO +106 -0
- iptime_cli-0.1.2/README.md +83 -0
- {iptime_cli-0.1.0 → iptime_cli-0.1.2}/pyproject.toml +2 -2
- {iptime_cli-0.1.0 → iptime_cli-0.1.2}/src/iptime_cli/__init__.py +1 -1
- {iptime_cli-0.1.0 → iptime_cli-0.1.2}/src/iptime_cli/config.py +8 -3
- iptime_cli-0.1.2/src/iptime_cli.egg-info/PKG-INFO +106 -0
- iptime_cli-0.1.0/PKG-INFO +0 -356
- iptime_cli-0.1.0/README.md +0 -333
- iptime_cli-0.1.0/src/iptime_cli.egg-info/PKG-INFO +0 -356
- {iptime_cli-0.1.0 → iptime_cli-0.1.2}/LICENSE +0 -0
- {iptime_cli-0.1.0 → iptime_cli-0.1.2}/setup.cfg +0 -0
- {iptime_cli-0.1.0 → iptime_cli-0.1.2}/src/iptime_cli/__main__.py +0 -0
- {iptime_cli-0.1.0 → iptime_cli-0.1.2}/src/iptime_cli/catalog.py +0 -0
- {iptime_cli-0.1.0 → iptime_cli-0.1.2}/src/iptime_cli/cli.py +0 -0
- {iptime_cli-0.1.0 → iptime_cli-0.1.2}/src/iptime_cli/client.py +0 -0
- {iptime_cli-0.1.0 → iptime_cli-0.1.2}/src/iptime_cli/fake_router.py +0 -0
- {iptime_cli-0.1.0 → iptime_cli-0.1.2}/src/iptime_cli/render.py +0 -0
- {iptime_cli-0.1.0 → iptime_cli-0.1.2}/src/iptime_cli.egg-info/SOURCES.txt +0 -0
- {iptime_cli-0.1.0 → iptime_cli-0.1.2}/src/iptime_cli.egg-info/dependency_links.txt +0 -0
- {iptime_cli-0.1.0 → iptime_cli-0.1.2}/src/iptime_cli.egg-info/entry_points.txt +0 -0
- {iptime_cli-0.1.0 → iptime_cli-0.1.2}/src/iptime_cli.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: iptime-cli
|
|
3
|
+
Version: 0.1.2
|
|
4
|
+
Summary: An unofficial CLI and Python library for reading and changing ipTIME routers that run the new firmware 16.x admin UI.
|
|
5
|
+
Author: El Fenomeno
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/elfenomenokim/iptime-cli
|
|
8
|
+
Project-URL: Repository, https://github.com/elfenomenokim/iptime-cli
|
|
9
|
+
Project-URL: Issues, https://github.com/elfenomenokim/iptime-cli/issues
|
|
10
|
+
Keywords: iptime,router,cli,korea,efm,port-forwarding,dhcp,wifi,home-network
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Intended Audience :: System Administrators
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
|
+
Classifier: Topic :: System :: Networking
|
|
19
|
+
Requires-Python: >=3.9
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
License-File: LICENSE
|
|
22
|
+
Dynamic: license-file
|
|
23
|
+
|
|
24
|
+
# iptime-cli
|
|
25
|
+
|
|
26
|
+
[한국어](README.ko.md)
|
|
27
|
+
|
|
28
|
+
An unofficial CLI and Python library for reading and changing ipTIME routers that run the new firmware 16.x admin UI.
|
|
29
|
+
|
|
30
|
+
<picture>
|
|
31
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/elfenomenokim/iptime-cli/main/docs/demo/iptime-dark.gif">
|
|
32
|
+
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/elfenomenokim/iptime-cli/main/docs/demo/iptime-light.gif">
|
|
33
|
+
<img alt="iptime-cli lists made-up router clients and previews a port-forwarding change" src="https://raw.githubusercontent.com/elfenomenokim/iptime-cli/main/docs/demo/iptime-light.gif">
|
|
34
|
+
</picture>
|
|
35
|
+
|
|
36
|
+
<!-- x-post -->
|
|
37
|
+
|
|
38
|
+
## Install
|
|
39
|
+
|
|
40
|
+
```console
|
|
41
|
+
$ pipx install iptime-cli
|
|
42
|
+
$ uv tool install iptime-cli
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Python 3.9 or newer. The package uses only the standard library.
|
|
46
|
+
|
|
47
|
+
## Quick start
|
|
48
|
+
|
|
49
|
+
Set `IPTIME_HOST`, `IPTIME_USER` and `IPTIME_PASSWORD`, or save them in the config file. Try the commands below against the bundled fake router before connecting real hardware.
|
|
50
|
+
|
|
51
|
+
```console
|
|
52
|
+
$ iptime clients
|
|
53
|
+
IP MAC NAME LINK LEASE LEFT RESERVED
|
|
54
|
+
192.168.0.10 AA:BB:CC:00:00:01 desktop lan2 wired static
|
|
55
|
+
192.168.0.11 AA:BB:CC:00:00:02 nas lan4 wired 22h 13m yes
|
|
56
|
+
192.168.0.20 AA:BB:CC:00:00:03 laptop 5g.1 -48 dBm 1h 46m
|
|
57
|
+
|
|
58
|
+
$ iptime info
|
|
59
|
+
Model ipTIME FAKE-1000
|
|
60
|
+
Firmware 16.000 (built 2026.01.01 00:00:00)
|
|
61
|
+
Latest firmware 16.010 (update available)
|
|
62
|
+
Uptime 1d 2h 3m
|
|
63
|
+
LAN 192.168.0.1 / 255.255.255.0
|
|
64
|
+
DHCP pool 192.168.0.2 - 192.168.0.254
|
|
65
|
+
WAN dhcp 203.0.113.7 gateway 203.0.113.1 up
|
|
66
|
+
WAN link 1000f
|
|
67
|
+
|
|
68
|
+
$ iptime port add "Game server" --target 192.168.0.10 --ext 25565 --dry-run
|
|
69
|
+
dry run, nothing sent:
|
|
70
|
+
POST http://127.0.0.1:18180/cgi/service.cgi
|
|
71
|
+
{"method": "portforward/add", "params": {"name": "Game server", "active": true, "protocol": "tcp", "target": "192.168.0.10", "src": {"start": 25565}, "dst": {"start": 25565}}}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
The fake router serves fixed, invented devices on localhost. Start it with `python -m iptime_cli.fake_router --port 18180`, then set `IPTIME_HOST=127.0.0.1:18180` and `IPTIME_PASSWORD=secret`.
|
|
75
|
+
|
|
76
|
+
<picture>
|
|
77
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/elfenomenokim/iptime-cli/main/docs/diagrams/router-flow.dark.svg">
|
|
78
|
+
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/elfenomenokim/iptime-cli/main/docs/diagrams/router-flow.light.svg">
|
|
79
|
+
<img alt="iptime-cli sends commands to the router API and returns readable output; dry-run previews a write" src="https://raw.githubusercontent.com/elfenomenokim/iptime-cli/main/docs/diagrams/router-flow.light.svg">
|
|
80
|
+
</picture>
|
|
81
|
+
|
|
82
|
+
## Why
|
|
83
|
+
|
|
84
|
+
The firmware 16.x admin UI talks to the router through a JSON endpoint. `iptime-cli` uses that endpoint for terminal commands and Python calls; it does not support the older firmware 14.x UI or other router brands.
|
|
85
|
+
|
|
86
|
+
Read commands do not change router settings. Write commands show a confirmation or accept `--dry-run`; in non-interactive use they require `--yes`. Login may end an admin session open in a browser. A firmware upgrade reboots the router and interrupts the network.
|
|
87
|
+
|
|
88
|
+
## Commands
|
|
89
|
+
|
|
90
|
+
| Command | Reads or changes |
|
|
91
|
+
|---|---|
|
|
92
|
+
| `iptime info`, `clients`, `wan`, `wifi` | Router and connection status |
|
|
93
|
+
| `iptime dhcp list`, `port list` | Existing leases, reservations and forwarding rules |
|
|
94
|
+
| `iptime dhcp reserve`, `port add`, `port rm` | DHCP and forwarding settings |
|
|
95
|
+
| `iptime remote-admin`, `firmware check` | Remote access and firmware status |
|
|
96
|
+
| `iptime call`, `iptime methods` | Raw API methods and their recorded status |
|
|
97
|
+
|
|
98
|
+
Add `--json` to read commands for scripts. Wi-Fi passwords are hidden unless you pass `--show-secrets`. The Python API starts with `Router(host, user, password).call(method, params)`.
|
|
99
|
+
|
|
100
|
+
## Limits
|
|
101
|
+
|
|
102
|
+
The supported admin UI is firmware 16.x. Commands have been exercised with the bundled fake router; router models and firmware variants are listed in the project’s method catalog. Do not infer a router’s state after a failed connection.
|
|
103
|
+
|
|
104
|
+
## License
|
|
105
|
+
|
|
106
|
+
MIT. This unofficial project is not affiliated with, endorsed by or supported by EFM Networks. ipTIME is its trademark.
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# iptime-cli
|
|
2
|
+
|
|
3
|
+
[한국어](README.ko.md)
|
|
4
|
+
|
|
5
|
+
An unofficial CLI and Python library for reading and changing ipTIME routers that run the new firmware 16.x admin UI.
|
|
6
|
+
|
|
7
|
+
<picture>
|
|
8
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/elfenomenokim/iptime-cli/main/docs/demo/iptime-dark.gif">
|
|
9
|
+
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/elfenomenokim/iptime-cli/main/docs/demo/iptime-light.gif">
|
|
10
|
+
<img alt="iptime-cli lists made-up router clients and previews a port-forwarding change" src="https://raw.githubusercontent.com/elfenomenokim/iptime-cli/main/docs/demo/iptime-light.gif">
|
|
11
|
+
</picture>
|
|
12
|
+
|
|
13
|
+
<!-- x-post -->
|
|
14
|
+
|
|
15
|
+
## Install
|
|
16
|
+
|
|
17
|
+
```console
|
|
18
|
+
$ pipx install iptime-cli
|
|
19
|
+
$ uv tool install iptime-cli
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Python 3.9 or newer. The package uses only the standard library.
|
|
23
|
+
|
|
24
|
+
## Quick start
|
|
25
|
+
|
|
26
|
+
Set `IPTIME_HOST`, `IPTIME_USER` and `IPTIME_PASSWORD`, or save them in the config file. Try the commands below against the bundled fake router before connecting real hardware.
|
|
27
|
+
|
|
28
|
+
```console
|
|
29
|
+
$ iptime clients
|
|
30
|
+
IP MAC NAME LINK LEASE LEFT RESERVED
|
|
31
|
+
192.168.0.10 AA:BB:CC:00:00:01 desktop lan2 wired static
|
|
32
|
+
192.168.0.11 AA:BB:CC:00:00:02 nas lan4 wired 22h 13m yes
|
|
33
|
+
192.168.0.20 AA:BB:CC:00:00:03 laptop 5g.1 -48 dBm 1h 46m
|
|
34
|
+
|
|
35
|
+
$ iptime info
|
|
36
|
+
Model ipTIME FAKE-1000
|
|
37
|
+
Firmware 16.000 (built 2026.01.01 00:00:00)
|
|
38
|
+
Latest firmware 16.010 (update available)
|
|
39
|
+
Uptime 1d 2h 3m
|
|
40
|
+
LAN 192.168.0.1 / 255.255.255.0
|
|
41
|
+
DHCP pool 192.168.0.2 - 192.168.0.254
|
|
42
|
+
WAN dhcp 203.0.113.7 gateway 203.0.113.1 up
|
|
43
|
+
WAN link 1000f
|
|
44
|
+
|
|
45
|
+
$ iptime port add "Game server" --target 192.168.0.10 --ext 25565 --dry-run
|
|
46
|
+
dry run, nothing sent:
|
|
47
|
+
POST http://127.0.0.1:18180/cgi/service.cgi
|
|
48
|
+
{"method": "portforward/add", "params": {"name": "Game server", "active": true, "protocol": "tcp", "target": "192.168.0.10", "src": {"start": 25565}, "dst": {"start": 25565}}}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
The fake router serves fixed, invented devices on localhost. Start it with `python -m iptime_cli.fake_router --port 18180`, then set `IPTIME_HOST=127.0.0.1:18180` and `IPTIME_PASSWORD=secret`.
|
|
52
|
+
|
|
53
|
+
<picture>
|
|
54
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/elfenomenokim/iptime-cli/main/docs/diagrams/router-flow.dark.svg">
|
|
55
|
+
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/elfenomenokim/iptime-cli/main/docs/diagrams/router-flow.light.svg">
|
|
56
|
+
<img alt="iptime-cli sends commands to the router API and returns readable output; dry-run previews a write" src="https://raw.githubusercontent.com/elfenomenokim/iptime-cli/main/docs/diagrams/router-flow.light.svg">
|
|
57
|
+
</picture>
|
|
58
|
+
|
|
59
|
+
## Why
|
|
60
|
+
|
|
61
|
+
The firmware 16.x admin UI talks to the router through a JSON endpoint. `iptime-cli` uses that endpoint for terminal commands and Python calls; it does not support the older firmware 14.x UI or other router brands.
|
|
62
|
+
|
|
63
|
+
Read commands do not change router settings. Write commands show a confirmation or accept `--dry-run`; in non-interactive use they require `--yes`. Login may end an admin session open in a browser. A firmware upgrade reboots the router and interrupts the network.
|
|
64
|
+
|
|
65
|
+
## Commands
|
|
66
|
+
|
|
67
|
+
| Command | Reads or changes |
|
|
68
|
+
|---|---|
|
|
69
|
+
| `iptime info`, `clients`, `wan`, `wifi` | Router and connection status |
|
|
70
|
+
| `iptime dhcp list`, `port list` | Existing leases, reservations and forwarding rules |
|
|
71
|
+
| `iptime dhcp reserve`, `port add`, `port rm` | DHCP and forwarding settings |
|
|
72
|
+
| `iptime remote-admin`, `firmware check` | Remote access and firmware status |
|
|
73
|
+
| `iptime call`, `iptime methods` | Raw API methods and their recorded status |
|
|
74
|
+
|
|
75
|
+
Add `--json` to read commands for scripts. Wi-Fi passwords are hidden unless you pass `--show-secrets`. The Python API starts with `Router(host, user, password).call(method, params)`.
|
|
76
|
+
|
|
77
|
+
## Limits
|
|
78
|
+
|
|
79
|
+
The supported admin UI is firmware 16.x. Commands have been exercised with the bundled fake router; router models and firmware variants are listed in the project’s method catalog. Do not infer a router’s state after a failed connection.
|
|
80
|
+
|
|
81
|
+
## License
|
|
82
|
+
|
|
83
|
+
MIT. This unofficial project is not affiliated with, endorsed by or supported by EFM Networks. ipTIME is its trademark.
|
|
@@ -4,8 +4,8 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "iptime-cli"
|
|
7
|
-
version = "0.1.
|
|
8
|
-
description = "
|
|
7
|
+
version = "0.1.2"
|
|
8
|
+
description = "An unofficial CLI and Python library for reading and changing ipTIME routers that run the new firmware 16.x admin UI."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
|
11
11
|
license = "MIT"
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
from .client import (ApiError, CaptchaError, ConnectError, IptimeError, Lease, LockoutError,
|
|
3
3
|
LoginError, OldUiError, PortForward, Reservation, Router, Station, UpgradeError)
|
|
4
4
|
|
|
5
|
-
__version__ = "0.1.
|
|
5
|
+
__version__ = "0.1.2"
|
|
6
6
|
__all__ = ["Router", "Station", "Lease", "Reservation", "PortForward", "IptimeError", "ApiError",
|
|
7
7
|
"LoginError", "CaptchaError", "LockoutError", "OldUiError", "ConnectError", "UpgradeError"]
|
|
@@ -30,8 +30,12 @@ class Settings:
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
def default_config_path() -> str:
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
"""~/.config/iptime-cli/config (XDG); on Windows %APPDATA%\\iptime-cli\\config unless XDG_CONFIG_HOME is set."""
|
|
34
|
+
base = os.environ.get("XDG_CONFIG_HOME")
|
|
35
|
+
if not base and os.name == "nt" and os.environ.get("APPDATA"):
|
|
36
|
+
base = os.environ["APPDATA"]
|
|
37
|
+
base = base or os.path.join(os.path.expanduser("~"), ".config")
|
|
38
|
+
return os.path.normpath(os.path.join(base, "iptime-cli", "config"))
|
|
35
39
|
|
|
36
40
|
|
|
37
41
|
def read_file(path: str, warn=True) -> dict:
|
|
@@ -49,7 +53,8 @@ def read_file(path: str, warn=True) -> dict:
|
|
|
49
53
|
for name, aliases in _KEYS.items():
|
|
50
54
|
if key in aliases:
|
|
51
55
|
out[name] = value
|
|
52
|
-
|
|
56
|
+
# POSIX mode bits mean nothing on Windows (every file reports 0666); the user profile ACL protects it there.
|
|
57
|
+
if warn and out.get("password") and os.name != "nt":
|
|
53
58
|
mode = stat.S_IMODE(os.stat(path).st_mode)
|
|
54
59
|
if mode & 0o077:
|
|
55
60
|
print(f"warning: {path} holds a password but is readable by others "
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: iptime-cli
|
|
3
|
+
Version: 0.1.2
|
|
4
|
+
Summary: An unofficial CLI and Python library for reading and changing ipTIME routers that run the new firmware 16.x admin UI.
|
|
5
|
+
Author: El Fenomeno
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/elfenomenokim/iptime-cli
|
|
8
|
+
Project-URL: Repository, https://github.com/elfenomenokim/iptime-cli
|
|
9
|
+
Project-URL: Issues, https://github.com/elfenomenokim/iptime-cli/issues
|
|
10
|
+
Keywords: iptime,router,cli,korea,efm,port-forwarding,dhcp,wifi,home-network
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Intended Audience :: System Administrators
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
|
+
Classifier: Topic :: System :: Networking
|
|
19
|
+
Requires-Python: >=3.9
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
License-File: LICENSE
|
|
22
|
+
Dynamic: license-file
|
|
23
|
+
|
|
24
|
+
# iptime-cli
|
|
25
|
+
|
|
26
|
+
[한국어](README.ko.md)
|
|
27
|
+
|
|
28
|
+
An unofficial CLI and Python library for reading and changing ipTIME routers that run the new firmware 16.x admin UI.
|
|
29
|
+
|
|
30
|
+
<picture>
|
|
31
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/elfenomenokim/iptime-cli/main/docs/demo/iptime-dark.gif">
|
|
32
|
+
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/elfenomenokim/iptime-cli/main/docs/demo/iptime-light.gif">
|
|
33
|
+
<img alt="iptime-cli lists made-up router clients and previews a port-forwarding change" src="https://raw.githubusercontent.com/elfenomenokim/iptime-cli/main/docs/demo/iptime-light.gif">
|
|
34
|
+
</picture>
|
|
35
|
+
|
|
36
|
+
<!-- x-post -->
|
|
37
|
+
|
|
38
|
+
## Install
|
|
39
|
+
|
|
40
|
+
```console
|
|
41
|
+
$ pipx install iptime-cli
|
|
42
|
+
$ uv tool install iptime-cli
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Python 3.9 or newer. The package uses only the standard library.
|
|
46
|
+
|
|
47
|
+
## Quick start
|
|
48
|
+
|
|
49
|
+
Set `IPTIME_HOST`, `IPTIME_USER` and `IPTIME_PASSWORD`, or save them in the config file. Try the commands below against the bundled fake router before connecting real hardware.
|
|
50
|
+
|
|
51
|
+
```console
|
|
52
|
+
$ iptime clients
|
|
53
|
+
IP MAC NAME LINK LEASE LEFT RESERVED
|
|
54
|
+
192.168.0.10 AA:BB:CC:00:00:01 desktop lan2 wired static
|
|
55
|
+
192.168.0.11 AA:BB:CC:00:00:02 nas lan4 wired 22h 13m yes
|
|
56
|
+
192.168.0.20 AA:BB:CC:00:00:03 laptop 5g.1 -48 dBm 1h 46m
|
|
57
|
+
|
|
58
|
+
$ iptime info
|
|
59
|
+
Model ipTIME FAKE-1000
|
|
60
|
+
Firmware 16.000 (built 2026.01.01 00:00:00)
|
|
61
|
+
Latest firmware 16.010 (update available)
|
|
62
|
+
Uptime 1d 2h 3m
|
|
63
|
+
LAN 192.168.0.1 / 255.255.255.0
|
|
64
|
+
DHCP pool 192.168.0.2 - 192.168.0.254
|
|
65
|
+
WAN dhcp 203.0.113.7 gateway 203.0.113.1 up
|
|
66
|
+
WAN link 1000f
|
|
67
|
+
|
|
68
|
+
$ iptime port add "Game server" --target 192.168.0.10 --ext 25565 --dry-run
|
|
69
|
+
dry run, nothing sent:
|
|
70
|
+
POST http://127.0.0.1:18180/cgi/service.cgi
|
|
71
|
+
{"method": "portforward/add", "params": {"name": "Game server", "active": true, "protocol": "tcp", "target": "192.168.0.10", "src": {"start": 25565}, "dst": {"start": 25565}}}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
The fake router serves fixed, invented devices on localhost. Start it with `python -m iptime_cli.fake_router --port 18180`, then set `IPTIME_HOST=127.0.0.1:18180` and `IPTIME_PASSWORD=secret`.
|
|
75
|
+
|
|
76
|
+
<picture>
|
|
77
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/elfenomenokim/iptime-cli/main/docs/diagrams/router-flow.dark.svg">
|
|
78
|
+
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/elfenomenokim/iptime-cli/main/docs/diagrams/router-flow.light.svg">
|
|
79
|
+
<img alt="iptime-cli sends commands to the router API and returns readable output; dry-run previews a write" src="https://raw.githubusercontent.com/elfenomenokim/iptime-cli/main/docs/diagrams/router-flow.light.svg">
|
|
80
|
+
</picture>
|
|
81
|
+
|
|
82
|
+
## Why
|
|
83
|
+
|
|
84
|
+
The firmware 16.x admin UI talks to the router through a JSON endpoint. `iptime-cli` uses that endpoint for terminal commands and Python calls; it does not support the older firmware 14.x UI or other router brands.
|
|
85
|
+
|
|
86
|
+
Read commands do not change router settings. Write commands show a confirmation or accept `--dry-run`; in non-interactive use they require `--yes`. Login may end an admin session open in a browser. A firmware upgrade reboots the router and interrupts the network.
|
|
87
|
+
|
|
88
|
+
## Commands
|
|
89
|
+
|
|
90
|
+
| Command | Reads or changes |
|
|
91
|
+
|---|---|
|
|
92
|
+
| `iptime info`, `clients`, `wan`, `wifi` | Router and connection status |
|
|
93
|
+
| `iptime dhcp list`, `port list` | Existing leases, reservations and forwarding rules |
|
|
94
|
+
| `iptime dhcp reserve`, `port add`, `port rm` | DHCP and forwarding settings |
|
|
95
|
+
| `iptime remote-admin`, `firmware check` | Remote access and firmware status |
|
|
96
|
+
| `iptime call`, `iptime methods` | Raw API methods and their recorded status |
|
|
97
|
+
|
|
98
|
+
Add `--json` to read commands for scripts. Wi-Fi passwords are hidden unless you pass `--show-secrets`. The Python API starts with `Router(host, user, password).call(method, params)`.
|
|
99
|
+
|
|
100
|
+
## Limits
|
|
101
|
+
|
|
102
|
+
The supported admin UI is firmware 16.x. Commands have been exercised with the bundled fake router; router models and firmware variants are listed in the project’s method catalog. Do not infer a router’s state after a failed connection.
|
|
103
|
+
|
|
104
|
+
## License
|
|
105
|
+
|
|
106
|
+
MIT. This unofficial project is not affiliated with, endorsed by or supported by EFM Networks. ipTIME is its trademark.
|