pasarguard 2.2.3__tar.gz → 2.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.
- {pasarguard-2.2.3 → pasarguard-2.2.4}/.github/workflows/api-governance.yml +4 -2
- {pasarguard-2.2.3 → pasarguard-2.2.4}/.github/workflows/publish-pypi.yml +3 -1
- {pasarguard-2.2.3 → pasarguard-2.2.4}/PKG-INFO +2 -2
- {pasarguard-2.2.3 → pasarguard-2.2.4}/examples/README.md +1 -0
- pasarguard-2.2.4/examples/proxy.py +72 -0
- pasarguard-2.2.4/pasarguard/__init__.py +483 -0
- {pasarguard-2.2.3 → pasarguard-2.2.4}/pasarguard/api.py +1 -2
- {pasarguard-2.2.3 → pasarguard-2.2.4}/pasarguard/client/__init__.py +1 -1
- {pasarguard-2.2.3 → pasarguard-2.2.4}/pasarguard/client/admin.py +151 -89
- {pasarguard-2.2.3 → pasarguard-2.2.4}/pasarguard/client/admin_role.py +8 -9
- {pasarguard-2.2.3 → pasarguard-2.2.4}/pasarguard/client/base.py +85 -33
- pasarguard-2.2.4/pasarguard/client/client_template.py +95 -0
- {pasarguard-2.2.3 → pasarguard-2.2.4}/pasarguard/client/compat.py +33 -9
- {pasarguard-2.2.3 → pasarguard-2.2.4}/pasarguard/client/core.py +35 -26
- pasarguard-2.2.4/pasarguard/client/default.py +19 -0
- {pasarguard-2.2.3 → pasarguard-2.2.4}/pasarguard/client/groups.py +42 -30
- {pasarguard-2.2.3 → pasarguard-2.2.4}/pasarguard/client/host.py +28 -28
- {pasarguard-2.2.3 → pasarguard-2.2.4}/pasarguard/client/node.py +153 -97
- {pasarguard-2.2.3 → pasarguard-2.2.4}/pasarguard/client/settings.py +7 -7
- {pasarguard-2.2.3 → pasarguard-2.2.4}/pasarguard/client/setup.py +1 -1
- pasarguard-2.2.4/pasarguard/client/subscription.py +107 -0
- {pasarguard-2.2.3 → pasarguard-2.2.4}/pasarguard/client/system.py +21 -23
- {pasarguard-2.2.3 → pasarguard-2.2.4}/pasarguard/client/user.py +339 -169
- {pasarguard-2.2.3 → pasarguard-2.2.4}/pasarguard/client/user_hwid.py +9 -10
- pasarguard-2.2.4/pasarguard/client/user_template.py +100 -0
- {pasarguard-2.2.3 → pasarguard-2.2.4}/pasarguard/enums/__init__.py +2 -3
- pasarguard-2.2.4/pasarguard/enums/client_template.py +14 -0
- pasarguard-2.2.4/pasarguard/enums/core.py +13 -0
- pasarguard-2.2.4/pasarguard/enums/general.py +53 -0
- pasarguard-2.2.4/pasarguard/enums/node.py +36 -0
- pasarguard-2.2.4/pasarguard/enums/proxy.py +85 -0
- {pasarguard-2.2.3 → pasarguard-2.2.4}/pasarguard/enums/user.py +15 -15
- {pasarguard-2.2.3 → pasarguard-2.2.4}/pasarguard/models/__init__.py +2 -5
- {pasarguard-2.2.3 → pasarguard-2.2.4}/pasarguard/models/_base.py +20 -17
- {pasarguard-2.2.3 → pasarguard-2.2.4}/pasarguard/models/admin.py +33 -18
- {pasarguard-2.2.3 → pasarguard-2.2.4}/pasarguard/models/admin_role.py +14 -18
- {pasarguard-2.2.3 → pasarguard-2.2.4}/pasarguard/models/client_template.py +19 -10
- {pasarguard-2.2.3 → pasarguard-2.2.4}/pasarguard/models/common.py +30 -19
- {pasarguard-2.2.3 → pasarguard-2.2.4}/pasarguard/models/core.py +17 -9
- {pasarguard-2.2.3 → pasarguard-2.2.4}/pasarguard/models/groups.py +24 -13
- {pasarguard-2.2.3 → pasarguard-2.2.4}/pasarguard/models/host.py +23 -14
- {pasarguard-2.2.3 → pasarguard-2.2.4}/pasarguard/models/node.py +51 -28
- {pasarguard-2.2.3 → pasarguard-2.2.4}/pasarguard/models/proxy.py +81 -50
- {pasarguard-2.2.3 → pasarguard-2.2.4}/pasarguard/models/settings.py +30 -18
- {pasarguard-2.2.3 → pasarguard-2.2.4}/pasarguard/models/subscription.py +22 -14
- {pasarguard-2.2.3 → pasarguard-2.2.4}/pasarguard/models/system.py +13 -6
- {pasarguard-2.2.3 → pasarguard-2.2.4}/pasarguard/models/user.py +64 -33
- {pasarguard-2.2.3 → pasarguard-2.2.4}/pasarguard/models/user_hwid.py +5 -2
- {pasarguard-2.2.3 → pasarguard-2.2.4}/pasarguard/models/user_template.py +20 -11
- {pasarguard-2.2.3 → pasarguard-2.2.4}/pasarguard/utils.py +8 -7
- {pasarguard-2.2.3 → pasarguard-2.2.4}/pasarguard-sdk.code-workspace +5 -8
- {pasarguard-2.2.3 → pasarguard-2.2.4}/pyproject.toml +50 -2
- {pasarguard-2.2.3 → pasarguard-2.2.4}/uv.lock +17 -3
- pasarguard-2.2.3/pasarguard/__init__.py +0 -483
- pasarguard-2.2.3/pasarguard/client/_imports.py +0 -232
- pasarguard-2.2.3/pasarguard/client/client_template.py +0 -68
- pasarguard-2.2.3/pasarguard/client/default.py +0 -22
- pasarguard-2.2.3/pasarguard/client/subscription.py +0 -57
- pasarguard-2.2.3/pasarguard/client/user_template.py +0 -83
- pasarguard-2.2.3/pasarguard/enums/client_template.py +0 -14
- pasarguard-2.2.3/pasarguard/enums/core.py +0 -13
- pasarguard-2.2.3/pasarguard/enums/general.py +0 -53
- pasarguard-2.2.3/pasarguard/enums/node.py +0 -36
- pasarguard-2.2.3/pasarguard/enums/proxy.py +0 -85
- {pasarguard-2.2.3 → pasarguard-2.2.4}/.gitattributes +0 -0
- {pasarguard-2.2.3 → pasarguard-2.2.4}/.github/dependabot.yml +0 -0
- {pasarguard-2.2.3 → pasarguard-2.2.4}/.gitignore +0 -0
- {pasarguard-2.2.3 → pasarguard-2.2.4}/CNAME +0 -0
- {pasarguard-2.2.3 → pasarguard-2.2.4}/LICENSE +0 -0
- {pasarguard-2.2.3 → pasarguard-2.2.4}/README.fa.md +0 -0
- {pasarguard-2.2.3 → pasarguard-2.2.4}/README.md +0 -0
- {pasarguard-2.2.3 → pasarguard-2.2.4}/docs/CNAME +0 -0
- {pasarguard-2.2.3 → pasarguard-2.2.4}/docs/index.html +0 -0
- {pasarguard-2.2.3 → pasarguard-2.2.4}/docs/openapi.json +0 -0
- {pasarguard-2.2.3 → pasarguard-2.2.4}/examples/admin_roles.py +0 -0
- {pasarguard-2.2.3 → pasarguard-2.2.4}/examples/admins.py +0 -0
- {pasarguard-2.2.3 → pasarguard-2.2.4}/examples/authentication.py +0 -0
- {pasarguard-2.2.3 → pasarguard-2.2.4}/examples/client_templates.py +0 -0
- {pasarguard-2.2.3 → pasarguard-2.2.4}/examples/cores.py +0 -0
- {pasarguard-2.2.3 → pasarguard-2.2.4}/examples/getting_started.py +0 -0
- {pasarguard-2.2.3 → pasarguard-2.2.4}/examples/groups.py +0 -0
- {pasarguard-2.2.3 → pasarguard-2.2.4}/examples/health.py +0 -0
- {pasarguard-2.2.3 → pasarguard-2.2.4}/examples/hosts.py +0 -0
- {pasarguard-2.2.3 → pasarguard-2.2.4}/examples/legacy_aliases.py +0 -0
- {pasarguard-2.2.3 → pasarguard-2.2.4}/examples/nodes.py +0 -0
- {pasarguard-2.2.3 → pasarguard-2.2.4}/examples/settings.py +0 -0
- {pasarguard-2.2.3 → pasarguard-2.2.4}/examples/setup.py +0 -0
- {pasarguard-2.2.3 → pasarguard-2.2.4}/examples/subscriptions.py +0 -0
- {pasarguard-2.2.3 → pasarguard-2.2.4}/examples/system.py +0 -0
- {pasarguard-2.2.3 → pasarguard-2.2.4}/examples/tools.py +0 -0
- {pasarguard-2.2.3 → pasarguard-2.2.4}/examples/user_hwid.py +0 -0
- {pasarguard-2.2.3 → pasarguard-2.2.4}/examples/user_templates.py +0 -0
- {pasarguard-2.2.3 → pasarguard-2.2.4}/examples/users.py +0 -0
- {pasarguard-2.2.3 → pasarguard-2.2.4}/pasarguard/enums/admin.py +0 -0
|
@@ -26,17 +26,19 @@ jobs:
|
|
|
26
26
|
pull-requests: write
|
|
27
27
|
steps:
|
|
28
28
|
- name: Checkout repository
|
|
29
|
-
uses: actions/checkout@
|
|
29
|
+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
|
|
30
30
|
with:
|
|
31
31
|
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.head_ref || github.ref }}
|
|
32
32
|
fetch-depth: 0
|
|
33
|
+
persist-credentials: false
|
|
33
34
|
|
|
34
35
|
- name: Checkout base revision
|
|
35
|
-
uses: actions/checkout@
|
|
36
|
+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
|
|
36
37
|
with:
|
|
37
38
|
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.base_ref || github.event.pull_request.base.sha }}
|
|
38
39
|
path: base
|
|
39
40
|
fetch-depth: 1
|
|
41
|
+
persist-credentials: false
|
|
40
42
|
|
|
41
43
|
- name: Compare OpenAPI contract
|
|
42
44
|
shell: bash
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pasarguard
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.4
|
|
4
4
|
Summary: A modern async Python client for the Pasarguard API with typed models and full admin automation support
|
|
5
5
|
Project-URL: Homepage, https://github.com/AmirKenzo/pasarguard_api
|
|
6
6
|
Project-URL: Repository, https://github.com/AmirKenzo/pasarguard_api
|
|
@@ -25,7 +25,7 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
|
25
25
|
Classifier: Typing :: Typed
|
|
26
26
|
Requires-Python: <3.15,>=3.10
|
|
27
27
|
Requires-Dist: datetime>=5.5
|
|
28
|
-
Requires-Dist: httpx>=0.28.1
|
|
28
|
+
Requires-Dist: httpx[socks]>=0.28.1
|
|
29
29
|
Requires-Dist: pydantic<2.14,>=2.4.1
|
|
30
30
|
Provides-Extra: ssh
|
|
31
31
|
Requires-Dist: paramiko>=4.0.0; extra == 'ssh'
|
|
@@ -58,6 +58,7 @@ python users.py
|
|
|
58
58
|
| [`setup.py`](setup.py) | Initial owner setup |
|
|
59
59
|
| [`user_hwid.py`](user_hwid.py) | User HWID devices |
|
|
60
60
|
| [`health.py`](health.py) | API health |
|
|
61
|
+
| [`proxy.py`](proxy.py) | HTTP/SOCKS proxy for API requests |
|
|
61
62
|
| [`legacy_aliases.py`](legacy_aliases.py) | Backward-compatible method names |
|
|
62
63
|
|
|
63
64
|
## Notes
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"""
|
|
2
|
+
HTTP/SOCKS proxy for API requests.
|
|
3
|
+
|
|
4
|
+
The client forwards the ``proxy`` argument to httpx for every request,
|
|
5
|
+
including token login and admin API calls.
|
|
6
|
+
|
|
7
|
+
Supported URL formats:
|
|
8
|
+
- ``http://127.0.0.1:8080``
|
|
9
|
+
- ``http://user:pass@127.0.0.1:8080``
|
|
10
|
+
- ``socks5://127.0.0.1:1080``
|
|
11
|
+
- ``socks5://user:pass@127.0.0.1:1080``
|
|
12
|
+
|
|
13
|
+
You can also rely on environment variables when ``trust_env=True`` (default):
|
|
14
|
+
``HTTP_PROXY``, ``HTTPS_PROXY``, and ``ALL_PROXY``.
|
|
15
|
+
|
|
16
|
+
Run: python proxy.py
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
from __future__ import annotations
|
|
20
|
+
|
|
21
|
+
import asyncio
|
|
22
|
+
import os
|
|
23
|
+
|
|
24
|
+
from pasarguard import PasarguardAPI
|
|
25
|
+
|
|
26
|
+
BASE_URL = os.environ.get("PASARGUARD_BASE_URL", "https://your-panel.example.com")
|
|
27
|
+
ADMIN_USERNAME = os.environ.get("PASARGUARD_ADMIN_USERNAME", "admin")
|
|
28
|
+
ADMIN_PASSWORD = os.environ.get("PASARGUARD_ADMIN_PASSWORD", "password")
|
|
29
|
+
|
|
30
|
+
# Examples:
|
|
31
|
+
# export PASARGUARD_PROXY="http://127.0.0.1:8080"
|
|
32
|
+
# export PASARGUARD_PROXY="socks5://127.0.0.1:1080"
|
|
33
|
+
# export PASARGUARD_PROXY="http://user:pass@proxy.example.com:8080"
|
|
34
|
+
PROXY = os.environ.get("PASARGUARD_PROXY", "http://127.0.0.1:8080")
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
async def with_explicit_proxy() -> None:
|
|
38
|
+
async with PasarguardAPI(
|
|
39
|
+
base_url=BASE_URL,
|
|
40
|
+
verify=True,
|
|
41
|
+
timeout=30.0,
|
|
42
|
+
proxy=PROXY,
|
|
43
|
+
trust_env=False,
|
|
44
|
+
) as api:
|
|
45
|
+
health = await api.health()
|
|
46
|
+
print("OK explicit proxy ->", health)
|
|
47
|
+
|
|
48
|
+
token = (await api.get_token(ADMIN_USERNAME, ADMIN_PASSWORD)).access_token
|
|
49
|
+
admin = await api.get_current_admin(token=token)
|
|
50
|
+
print(f"OK authenticated via proxy -> {admin.username}")
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
async def with_env_proxy() -> None:
|
|
54
|
+
# Reads HTTP_PROXY / HTTPS_PROXY / ALL_PROXY from the environment.
|
|
55
|
+
async with PasarguardAPI(
|
|
56
|
+
base_url=BASE_URL,
|
|
57
|
+
verify=True,
|
|
58
|
+
timeout=30.0,
|
|
59
|
+
trust_env=True,
|
|
60
|
+
) as api:
|
|
61
|
+
health = await api.health()
|
|
62
|
+
print("OK env proxy ->", health)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
async def main() -> None:
|
|
66
|
+
print(f"Using proxy: {PROXY}")
|
|
67
|
+
await with_explicit_proxy()
|
|
68
|
+
await with_env_proxy()
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
if __name__ == "__main__":
|
|
72
|
+
asyncio.run(main())
|
|
@@ -0,0 +1,483 @@
|
|
|
1
|
+
from .api import PasarguardAPI
|
|
2
|
+
from .enums import (
|
|
3
|
+
XUDP,
|
|
4
|
+
AdminAccountStatus,
|
|
5
|
+
AdminStatus,
|
|
6
|
+
ClientTemplateType,
|
|
7
|
+
ConfigFormat,
|
|
8
|
+
CoreType,
|
|
9
|
+
DataLimitResetStrategy,
|
|
10
|
+
ECHQueryStrategy,
|
|
11
|
+
FlowOption,
|
|
12
|
+
GeoFilseRegion,
|
|
13
|
+
HWIDMode,
|
|
14
|
+
Language,
|
|
15
|
+
MultiplexProtocol,
|
|
16
|
+
NodeConnectionType,
|
|
17
|
+
NodeStatus,
|
|
18
|
+
Period,
|
|
19
|
+
PermissionScope,
|
|
20
|
+
Platform,
|
|
21
|
+
ProxyHostALPN,
|
|
22
|
+
ProxyHostFingerprint,
|
|
23
|
+
ProxyHostSecurity,
|
|
24
|
+
RunMethod,
|
|
25
|
+
ShadowsocksMethod,
|
|
26
|
+
ShadowsocksMethods,
|
|
27
|
+
UsageTable,
|
|
28
|
+
UserCountMetric,
|
|
29
|
+
UserDataLimitResetStrategy,
|
|
30
|
+
UsernameGenerationStrategy,
|
|
31
|
+
UserStatus,
|
|
32
|
+
UserStatusCreate,
|
|
33
|
+
XHttpModes,
|
|
34
|
+
)
|
|
35
|
+
from .models import (
|
|
36
|
+
Admin,
|
|
37
|
+
AdminBase,
|
|
38
|
+
AdminContactInfo,
|
|
39
|
+
AdminCreate,
|
|
40
|
+
AdminDetails,
|
|
41
|
+
AdminModify,
|
|
42
|
+
AdminNotificationEnable,
|
|
43
|
+
AdminRoleCreate,
|
|
44
|
+
AdminRoleData,
|
|
45
|
+
AdminRoleModify,
|
|
46
|
+
AdminRoleResponse,
|
|
47
|
+
AdminRoleSimple,
|
|
48
|
+
AdminRolesResponse,
|
|
49
|
+
AdminRolesSimpleResponse,
|
|
50
|
+
AdminSimple,
|
|
51
|
+
AdminsPermissions,
|
|
52
|
+
AdminsResponse,
|
|
53
|
+
AdminsSimpleResponse,
|
|
54
|
+
Application,
|
|
55
|
+
BaseHost,
|
|
56
|
+
BaseNotificationEnable,
|
|
57
|
+
BodyAdminTokenApiAdminTokenPost,
|
|
58
|
+
Brutal,
|
|
59
|
+
BulkAdminsActionResponse,
|
|
60
|
+
BulkAdminSelection,
|
|
61
|
+
BulkClientTemplateSelection,
|
|
62
|
+
BulkCoreSelection,
|
|
63
|
+
BulkGroup,
|
|
64
|
+
BulkGroupsActionResponse,
|
|
65
|
+
BulkGroupSelection,
|
|
66
|
+
BulkHostsActionResponse,
|
|
67
|
+
BulkHostSelection,
|
|
68
|
+
BulkNodesActionResponse,
|
|
69
|
+
BulkNodeSelection,
|
|
70
|
+
BulkUser,
|
|
71
|
+
BulkUsersActionResponse,
|
|
72
|
+
BulkUsersApplyTemplate,
|
|
73
|
+
BulkUsersCreateResponse,
|
|
74
|
+
BulkUsersFromTemplate,
|
|
75
|
+
BulkUsersProxy,
|
|
76
|
+
BulkUsersSelection,
|
|
77
|
+
BulkUsersSetOwner,
|
|
78
|
+
BulkUserTemplatesActionResponse,
|
|
79
|
+
BulkUserTemplateSelection,
|
|
80
|
+
BulkWireGuardPeerIPs,
|
|
81
|
+
ClashMuxSettings,
|
|
82
|
+
ClientTemplateCreate,
|
|
83
|
+
ClientTemplateModify,
|
|
84
|
+
ClientTemplateResponse,
|
|
85
|
+
ClientTemplateResponseList,
|
|
86
|
+
ClientTemplateSimple,
|
|
87
|
+
ClientTemplatesSimpleResponse,
|
|
88
|
+
Conflict,
|
|
89
|
+
CoreCreate,
|
|
90
|
+
CoreResponse,
|
|
91
|
+
CoreResponseList,
|
|
92
|
+
CoreSimple,
|
|
93
|
+
CoresSimpleResponse,
|
|
94
|
+
CreateHost,
|
|
95
|
+
CreateUserFromTemplate,
|
|
96
|
+
CRUDPermissions,
|
|
97
|
+
DownloadLink,
|
|
98
|
+
ExtraSettings,
|
|
99
|
+
Forbidden,
|
|
100
|
+
FragmentSettings,
|
|
101
|
+
General,
|
|
102
|
+
GroupCreate,
|
|
103
|
+
GroupModify,
|
|
104
|
+
GroupResponse,
|
|
105
|
+
GroupSimple,
|
|
106
|
+
GroupsResponse,
|
|
107
|
+
GroupsSimpleResponse,
|
|
108
|
+
GRPCSettings,
|
|
109
|
+
HostBase,
|
|
110
|
+
HostNotificationEnable,
|
|
111
|
+
HostResponse,
|
|
112
|
+
HostsModel,
|
|
113
|
+
HostsPermissions,
|
|
114
|
+
HTTPException,
|
|
115
|
+
HTTPRequest,
|
|
116
|
+
HTTPResponse,
|
|
117
|
+
HTTPValidationError,
|
|
118
|
+
HWIDSettings,
|
|
119
|
+
HwidsPermissions,
|
|
120
|
+
HysteriaSettings,
|
|
121
|
+
InboundSummary,
|
|
122
|
+
KCPSettings,
|
|
123
|
+
ModifyUserByTemplate,
|
|
124
|
+
MuxSettingsInput,
|
|
125
|
+
MuxSettingsOutput,
|
|
126
|
+
NextPlanModel,
|
|
127
|
+
NodeCoreUpdate,
|
|
128
|
+
NodeCreate,
|
|
129
|
+
NodeGeoFilesUpdate,
|
|
130
|
+
NodeModify,
|
|
131
|
+
NodeNotificationEnable,
|
|
132
|
+
NodeOutboundLatency,
|
|
133
|
+
NodeOutboundsLatencyResponse,
|
|
134
|
+
NodeRealtimeStats,
|
|
135
|
+
NodeResponse,
|
|
136
|
+
NodeResponseList,
|
|
137
|
+
NodeSettings,
|
|
138
|
+
NodeSimple,
|
|
139
|
+
NodesPermissions,
|
|
140
|
+
NodesResponse,
|
|
141
|
+
NodesSimpleResponse,
|
|
142
|
+
NodeStats,
|
|
143
|
+
NodeStatsList,
|
|
144
|
+
NodeUsageStat,
|
|
145
|
+
NodeUsageStatsList,
|
|
146
|
+
NoiseSettings,
|
|
147
|
+
NotFound,
|
|
148
|
+
NotificationChannel,
|
|
149
|
+
NotificationChannels,
|
|
150
|
+
NotificationEnable,
|
|
151
|
+
NotificationSettings,
|
|
152
|
+
OwnerCreateRequest,
|
|
153
|
+
OwnerResetRequest,
|
|
154
|
+
OwnerUpgradeRequest,
|
|
155
|
+
PasarguardModel,
|
|
156
|
+
ProxySettings,
|
|
157
|
+
ProxyTable,
|
|
158
|
+
RemoveAdminsResponse,
|
|
159
|
+
RemoveClientTemplatesResponse,
|
|
160
|
+
RemoveCoresResponse,
|
|
161
|
+
RemoveGroupsResponse,
|
|
162
|
+
RemoveHostsResponse,
|
|
163
|
+
RemoveNodesResponse,
|
|
164
|
+
RemoveUsersResponse,
|
|
165
|
+
RemoveUserTemplatesResponse,
|
|
166
|
+
RoleAccess,
|
|
167
|
+
RoleFeatures,
|
|
168
|
+
RoleHWIDSettings,
|
|
169
|
+
RoleLimits,
|
|
170
|
+
RolePermissions,
|
|
171
|
+
SettingsPermissions,
|
|
172
|
+
SettingsSchema,
|
|
173
|
+
ShadowsocksSettings,
|
|
174
|
+
SingBoxFragmentSettings,
|
|
175
|
+
SingBoxMuxSettings,
|
|
176
|
+
SubFormatEnable,
|
|
177
|
+
SubRule,
|
|
178
|
+
Subscription,
|
|
179
|
+
SubscriptionTemplates,
|
|
180
|
+
SubscriptionUserResponse,
|
|
181
|
+
SystemPermissions,
|
|
182
|
+
SystemResourceStats,
|
|
183
|
+
SystemStats,
|
|
184
|
+
SystemUsersStats,
|
|
185
|
+
TcpSettings,
|
|
186
|
+
Telegram,
|
|
187
|
+
Token,
|
|
188
|
+
TransportSettingsInput,
|
|
189
|
+
TransportSettingsOutput,
|
|
190
|
+
TrojanSettings,
|
|
191
|
+
Unauthorized,
|
|
192
|
+
UserCountMetricStat,
|
|
193
|
+
UserCountMetricStatsList,
|
|
194
|
+
UserCreate,
|
|
195
|
+
UserHWIDListResponse,
|
|
196
|
+
UserHWIDResponse,
|
|
197
|
+
UserIPList,
|
|
198
|
+
UserIPListAll,
|
|
199
|
+
UserModify,
|
|
200
|
+
UserNotificationEnable,
|
|
201
|
+
UserResponse,
|
|
202
|
+
UserSimple,
|
|
203
|
+
UsersPermissions,
|
|
204
|
+
UsersResponse,
|
|
205
|
+
UsersSimpleResponse,
|
|
206
|
+
UserStatusToggle,
|
|
207
|
+
UserSubscriptionUpdateChart,
|
|
208
|
+
UserSubscriptionUpdateChartSegment,
|
|
209
|
+
UserSubscriptionUpdateList,
|
|
210
|
+
UserSubscriptionUpdateSchema,
|
|
211
|
+
UserTemplateCreate,
|
|
212
|
+
UserTemplateModify,
|
|
213
|
+
UserTemplateResponse,
|
|
214
|
+
UserTemplateSimple,
|
|
215
|
+
UserTemplatesSimpleResponse,
|
|
216
|
+
UserUsageStat,
|
|
217
|
+
UserUsageStatsList,
|
|
218
|
+
ValidationError,
|
|
219
|
+
VlessSettings,
|
|
220
|
+
VMessSettings,
|
|
221
|
+
VmessSettings,
|
|
222
|
+
Webhook,
|
|
223
|
+
WebhookInfo,
|
|
224
|
+
WebSocketSettings,
|
|
225
|
+
WireGuardHostOverrides,
|
|
226
|
+
WireGuardPeerIPsReallocateResponse,
|
|
227
|
+
WireGuardSettings,
|
|
228
|
+
WorkerHealth,
|
|
229
|
+
WorkersHealth,
|
|
230
|
+
XHttpSettingsInput,
|
|
231
|
+
XHttpSettingsOutput,
|
|
232
|
+
XMuxSettingsInput,
|
|
233
|
+
XMuxSettingsOutput,
|
|
234
|
+
XrayFragmentSettings,
|
|
235
|
+
XrayMuxSettingsInput,
|
|
236
|
+
XrayMuxSettingsOutput,
|
|
237
|
+
XrayNoiseSettings,
|
|
238
|
+
)
|
|
239
|
+
from .utils import PasarguardTokenCache, Tools
|
|
240
|
+
|
|
241
|
+
__version__ = "2.2.4"
|
|
242
|
+
OPENAPI_VERSION = "5.0.2"
|
|
243
|
+
|
|
244
|
+
__all__ = (
|
|
245
|
+
"OPENAPI_VERSION",
|
|
246
|
+
"XUDP",
|
|
247
|
+
"Admin",
|
|
248
|
+
"AdminAccountStatus",
|
|
249
|
+
"AdminBase",
|
|
250
|
+
"AdminContactInfo",
|
|
251
|
+
"AdminCreate",
|
|
252
|
+
"AdminDetails",
|
|
253
|
+
"AdminModify",
|
|
254
|
+
"AdminNotificationEnable",
|
|
255
|
+
"AdminRoleCreate",
|
|
256
|
+
"AdminRoleData",
|
|
257
|
+
"AdminRoleModify",
|
|
258
|
+
"AdminRoleResponse",
|
|
259
|
+
"AdminRoleSimple",
|
|
260
|
+
"AdminRolesResponse",
|
|
261
|
+
"AdminRolesSimpleResponse",
|
|
262
|
+
"AdminSimple",
|
|
263
|
+
"AdminStatus",
|
|
264
|
+
"AdminsPermissions",
|
|
265
|
+
"AdminsResponse",
|
|
266
|
+
"AdminsSimpleResponse",
|
|
267
|
+
"Application",
|
|
268
|
+
"BaseHost",
|
|
269
|
+
"BaseNotificationEnable",
|
|
270
|
+
"BodyAdminTokenApiAdminTokenPost",
|
|
271
|
+
"Brutal",
|
|
272
|
+
"BulkAdminSelection",
|
|
273
|
+
"BulkAdminsActionResponse",
|
|
274
|
+
"BulkClientTemplateSelection",
|
|
275
|
+
"BulkCoreSelection",
|
|
276
|
+
"BulkGroup",
|
|
277
|
+
"BulkGroupSelection",
|
|
278
|
+
"BulkGroupsActionResponse",
|
|
279
|
+
"BulkHostSelection",
|
|
280
|
+
"BulkHostsActionResponse",
|
|
281
|
+
"BulkNodeSelection",
|
|
282
|
+
"BulkNodesActionResponse",
|
|
283
|
+
"BulkUser",
|
|
284
|
+
"BulkUserTemplateSelection",
|
|
285
|
+
"BulkUserTemplatesActionResponse",
|
|
286
|
+
"BulkUsersActionResponse",
|
|
287
|
+
"BulkUsersApplyTemplate",
|
|
288
|
+
"BulkUsersCreateResponse",
|
|
289
|
+
"BulkUsersFromTemplate",
|
|
290
|
+
"BulkUsersProxy",
|
|
291
|
+
"BulkUsersSelection",
|
|
292
|
+
"BulkUsersSetOwner",
|
|
293
|
+
"BulkWireGuardPeerIPs",
|
|
294
|
+
"CRUDPermissions",
|
|
295
|
+
"ClashMuxSettings",
|
|
296
|
+
"ClientTemplateCreate",
|
|
297
|
+
"ClientTemplateModify",
|
|
298
|
+
"ClientTemplateResponse",
|
|
299
|
+
"ClientTemplateResponseList",
|
|
300
|
+
"ClientTemplateSimple",
|
|
301
|
+
"ClientTemplateType",
|
|
302
|
+
"ClientTemplatesSimpleResponse",
|
|
303
|
+
"ConfigFormat",
|
|
304
|
+
"Conflict",
|
|
305
|
+
"CoreCreate",
|
|
306
|
+
"CoreResponse",
|
|
307
|
+
"CoreResponseList",
|
|
308
|
+
"CoreSimple",
|
|
309
|
+
"CoreType",
|
|
310
|
+
"CoresSimpleResponse",
|
|
311
|
+
"CreateHost",
|
|
312
|
+
"CreateUserFromTemplate",
|
|
313
|
+
"DataLimitResetStrategy",
|
|
314
|
+
"DownloadLink",
|
|
315
|
+
"ECHQueryStrategy",
|
|
316
|
+
"ExtraSettings",
|
|
317
|
+
"FlowOption",
|
|
318
|
+
"Forbidden",
|
|
319
|
+
"FragmentSettings",
|
|
320
|
+
"GRPCSettings",
|
|
321
|
+
"General",
|
|
322
|
+
"GeoFilseRegion",
|
|
323
|
+
"GroupCreate",
|
|
324
|
+
"GroupModify",
|
|
325
|
+
"GroupResponse",
|
|
326
|
+
"GroupSimple",
|
|
327
|
+
"GroupsResponse",
|
|
328
|
+
"GroupsSimpleResponse",
|
|
329
|
+
"HTTPException",
|
|
330
|
+
"HTTPRequest",
|
|
331
|
+
"HTTPResponse",
|
|
332
|
+
"HTTPValidationError",
|
|
333
|
+
"HWIDMode",
|
|
334
|
+
"HWIDSettings",
|
|
335
|
+
"HostBase",
|
|
336
|
+
"HostNotificationEnable",
|
|
337
|
+
"HostResponse",
|
|
338
|
+
"HostsModel",
|
|
339
|
+
"HostsPermissions",
|
|
340
|
+
"HwidsPermissions",
|
|
341
|
+
"HysteriaSettings",
|
|
342
|
+
"InboundSummary",
|
|
343
|
+
"KCPSettings",
|
|
344
|
+
"Language",
|
|
345
|
+
"ModifyUserByTemplate",
|
|
346
|
+
"MultiplexProtocol",
|
|
347
|
+
"MuxSettingsInput",
|
|
348
|
+
"MuxSettingsOutput",
|
|
349
|
+
"NextPlanModel",
|
|
350
|
+
"NodeConnectionType",
|
|
351
|
+
"NodeCoreUpdate",
|
|
352
|
+
"NodeCreate",
|
|
353
|
+
"NodeGeoFilesUpdate",
|
|
354
|
+
"NodeModify",
|
|
355
|
+
"NodeNotificationEnable",
|
|
356
|
+
"NodeOutboundLatency",
|
|
357
|
+
"NodeOutboundsLatencyResponse",
|
|
358
|
+
"NodeRealtimeStats",
|
|
359
|
+
"NodeResponse",
|
|
360
|
+
"NodeResponseList",
|
|
361
|
+
"NodeSettings",
|
|
362
|
+
"NodeSimple",
|
|
363
|
+
"NodeStats",
|
|
364
|
+
"NodeStatsList",
|
|
365
|
+
"NodeStatus",
|
|
366
|
+
"NodeUsageStat",
|
|
367
|
+
"NodeUsageStatsList",
|
|
368
|
+
"NodesPermissions",
|
|
369
|
+
"NodesResponse",
|
|
370
|
+
"NodesSimpleResponse",
|
|
371
|
+
"NoiseSettings",
|
|
372
|
+
"NotFound",
|
|
373
|
+
"NotificationChannel",
|
|
374
|
+
"NotificationChannels",
|
|
375
|
+
"NotificationEnable",
|
|
376
|
+
"NotificationSettings",
|
|
377
|
+
"OwnerCreateRequest",
|
|
378
|
+
"OwnerResetRequest",
|
|
379
|
+
"OwnerUpgradeRequest",
|
|
380
|
+
"PasarguardAPI",
|
|
381
|
+
"PasarguardModel",
|
|
382
|
+
"PasarguardTokenCache",
|
|
383
|
+
"Period",
|
|
384
|
+
"PermissionScope",
|
|
385
|
+
"Platform",
|
|
386
|
+
"ProxyHostALPN",
|
|
387
|
+
"ProxyHostFingerprint",
|
|
388
|
+
"ProxyHostSecurity",
|
|
389
|
+
"ProxySettings",
|
|
390
|
+
"ProxyTable",
|
|
391
|
+
"RemoveAdminsResponse",
|
|
392
|
+
"RemoveClientTemplatesResponse",
|
|
393
|
+
"RemoveCoresResponse",
|
|
394
|
+
"RemoveGroupsResponse",
|
|
395
|
+
"RemoveHostsResponse",
|
|
396
|
+
"RemoveNodesResponse",
|
|
397
|
+
"RemoveUserTemplatesResponse",
|
|
398
|
+
"RemoveUsersResponse",
|
|
399
|
+
"RoleAccess",
|
|
400
|
+
"RoleFeatures",
|
|
401
|
+
"RoleHWIDSettings",
|
|
402
|
+
"RoleLimits",
|
|
403
|
+
"RolePermissions",
|
|
404
|
+
"RunMethod",
|
|
405
|
+
"SettingsPermissions",
|
|
406
|
+
"SettingsSchema",
|
|
407
|
+
"ShadowsocksMethod",
|
|
408
|
+
"ShadowsocksMethods",
|
|
409
|
+
"ShadowsocksSettings",
|
|
410
|
+
"SingBoxFragmentSettings",
|
|
411
|
+
"SingBoxMuxSettings",
|
|
412
|
+
"SubFormatEnable",
|
|
413
|
+
"SubRule",
|
|
414
|
+
"Subscription",
|
|
415
|
+
"SubscriptionTemplates",
|
|
416
|
+
"SubscriptionUserResponse",
|
|
417
|
+
"SystemPermissions",
|
|
418
|
+
"SystemResourceStats",
|
|
419
|
+
"SystemStats",
|
|
420
|
+
"SystemUsersStats",
|
|
421
|
+
"TcpSettings",
|
|
422
|
+
"Telegram",
|
|
423
|
+
"Token",
|
|
424
|
+
"Tools",
|
|
425
|
+
"TransportSettingsInput",
|
|
426
|
+
"TransportSettingsOutput",
|
|
427
|
+
"TrojanSettings",
|
|
428
|
+
"Unauthorized",
|
|
429
|
+
"UsageTable",
|
|
430
|
+
"UserCountMetric",
|
|
431
|
+
"UserCountMetricStat",
|
|
432
|
+
"UserCountMetricStatsList",
|
|
433
|
+
"UserCreate",
|
|
434
|
+
"UserDataLimitResetStrategy",
|
|
435
|
+
"UserHWIDListResponse",
|
|
436
|
+
"UserHWIDResponse",
|
|
437
|
+
"UserIPList",
|
|
438
|
+
"UserIPListAll",
|
|
439
|
+
"UserModify",
|
|
440
|
+
"UserNotificationEnable",
|
|
441
|
+
"UserResponse",
|
|
442
|
+
"UserSimple",
|
|
443
|
+
"UserStatus",
|
|
444
|
+
"UserStatusCreate",
|
|
445
|
+
"UserStatusToggle",
|
|
446
|
+
"UserSubscriptionUpdateChart",
|
|
447
|
+
"UserSubscriptionUpdateChartSegment",
|
|
448
|
+
"UserSubscriptionUpdateList",
|
|
449
|
+
"UserSubscriptionUpdateSchema",
|
|
450
|
+
"UserTemplateCreate",
|
|
451
|
+
"UserTemplateModify",
|
|
452
|
+
"UserTemplateResponse",
|
|
453
|
+
"UserTemplateSimple",
|
|
454
|
+
"UserTemplatesSimpleResponse",
|
|
455
|
+
"UserUsageStat",
|
|
456
|
+
"UserUsageStatsList",
|
|
457
|
+
"UsernameGenerationStrategy",
|
|
458
|
+
"UsersPermissions",
|
|
459
|
+
"UsersResponse",
|
|
460
|
+
"UsersSimpleResponse",
|
|
461
|
+
"VMessSettings",
|
|
462
|
+
"ValidationError",
|
|
463
|
+
"VlessSettings",
|
|
464
|
+
"VmessSettings",
|
|
465
|
+
"WebSocketSettings",
|
|
466
|
+
"Webhook",
|
|
467
|
+
"WebhookInfo",
|
|
468
|
+
"WireGuardHostOverrides",
|
|
469
|
+
"WireGuardPeerIPsReallocateResponse",
|
|
470
|
+
"WireGuardSettings",
|
|
471
|
+
"WorkerHealth",
|
|
472
|
+
"WorkersHealth",
|
|
473
|
+
"XHttpModes",
|
|
474
|
+
"XHttpSettingsInput",
|
|
475
|
+
"XHttpSettingsOutput",
|
|
476
|
+
"XMuxSettingsInput",
|
|
477
|
+
"XMuxSettingsOutput",
|
|
478
|
+
"XrayFragmentSettings",
|
|
479
|
+
"XrayMuxSettingsInput",
|
|
480
|
+
"XrayMuxSettingsOutput",
|
|
481
|
+
"XrayNoiseSettings",
|
|
482
|
+
"__version__",
|
|
483
|
+
)
|
|
@@ -2,9 +2,8 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
# Compatibility module: public users can still import PasarguardAPI and generated models/enums here.
|
|
4
4
|
# ruff: noqa: F401, F403
|
|
5
|
-
|
|
6
5
|
from .client import PasarguardAPI
|
|
7
6
|
from .enums import *
|
|
8
7
|
from .models import *
|
|
9
8
|
|
|
10
|
-
__all__ = tuple(name for name in globals() if not name.startswith("_") and name != "annotations")
|
|
9
|
+
__all__ = tuple(name for name in globals() if not name.startswith("_") and name != "annotations")
|