@dominusnode/openclaw-plugin 1.0.0

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.
package/README.md ADDED
@@ -0,0 +1,248 @@
1
+ # DomiNode OpenClaw Plugin
2
+
3
+ Route web requests through DomiNode's rotating proxy network directly from your OpenClaw AI coding sessions. Supports datacenter and residential proxy pools with geo-targeting across 195+ countries, agentic wallets for autonomous agent billing, and team collaboration with shared wallets.
4
+
5
+ ## What is DomiNode?
6
+
7
+ DomiNode is a rotating proxy-as-a-service (PaaS) platform. Users connect to DomiNode, are automatically assigned a proxy IP from a managed pool, and their traffic is routed through it. Usage is metered by bandwidth and billed via a prepaid wallet system.
8
+
9
+ - **Datacenter proxies**: $3.00/GB (fastest, best for non-protected targets)
10
+ - **Residential proxies**: $5.00/GB (premium, harder to detect)
11
+ - **Prepaid wallet**: Top up via Stripe or crypto (BTC, ETH, XMR, SOL, ZEC, and more)
12
+
13
+ ## Installation
14
+
15
+ ### As an OpenClaw Skill
16
+
17
+ 1. Copy `SKILL.md` and `plugin.ts` to your OpenClaw skills directory, or reference this integration directory directly.
18
+
19
+ 2. Set the required environment variables:
20
+
21
+ ```bash
22
+ export DOMINUSNODE_API_KEY="dn_live_YOUR_API_KEY_HERE"
23
+ export DOMINUSNODE_BASE_URL="https://api.dominusnode.com" # optional, this is the default
24
+ ```
25
+
26
+ 3. The skill will be automatically discovered by OpenClaw when the environment variables are set.
27
+
28
+ ### Manual Setup
29
+
30
+ ```bash
31
+ # Clone the DomiNode repo
32
+ git clone https://github.com/Dominus-Node/DomiNode.git
33
+ cd DomiNode/integrations/openclaw
34
+
35
+ # No npm install needed — the plugin uses only native fetch (Node 18+)
36
+ ```
37
+
38
+ ## Configuration
39
+
40
+ | Environment Variable | Required | Default | Description |
41
+ |---|---|---|---|
42
+ | `DOMINUSNODE_API_KEY` | Yes | -- | Your DomiNode API key (starts with `dn_live_` or `dn_test_`) |
43
+ | `DOMINUSNODE_BASE_URL` | No | `https://api.dominusnode.com` | Base URL for the DomiNode REST API |
44
+
45
+ ### Getting an API Key
46
+
47
+ 1. Register at [dominusnode.com](https://dominusnode.com)
48
+ 2. Log in and navigate to API Keys
49
+ 3. Create a new key -- it will start with `dn_live_`
50
+ 4. Fund your wallet via Stripe or crypto
51
+
52
+ ## Tools Reference
53
+
54
+ ### Proxy Tools
55
+
56
+ #### `proxied_fetch`
57
+ Fetch a URL through the proxy network with optional geo-targeting.
58
+
59
+ | Parameter | Type | Required | Description |
60
+ |---|---|---|---|
61
+ | `url` | string | Yes | The URL to fetch (http or https) |
62
+ | `method` | string | No | HTTP method (GET, POST, PUT, DELETE, PATCH, HEAD). Default: GET |
63
+ | `country` | string | No | ISO 3166-1 alpha-2 country code (e.g., US, GB, DE) |
64
+ | `pool` | string | No | Proxy pool: `dc` (datacenter, $3/GB) or `residential` ($5/GB). Default: dc |
65
+ | `headers` | object | No | Additional HTTP headers as key-value pairs |
66
+ | `body` | string | No | Request body for POST/PUT/PATCH |
67
+
68
+ #### `get_proxy_config`
69
+ View available proxy pools, pricing, supported countries, and endpoint configuration. No parameters.
70
+
71
+ #### `list_sessions`
72
+ List all active proxy sessions with status, target hosts, and bandwidth usage. No parameters.
73
+
74
+ ### Wallet Tools
75
+
76
+ #### `check_balance`
77
+ Check your wallet balance and estimated remaining bandwidth at current pricing. No parameters.
78
+
79
+ #### `check_usage`
80
+ View bandwidth usage statistics for a time period.
81
+
82
+ | Parameter | Type | Required | Description |
83
+ |---|---|---|---|
84
+ | `days` | number | No | Number of days to look back (1-365). Default: 30 |
85
+
86
+ ### Agentic Wallet Tools
87
+
88
+ Agentic wallets are server-side custodial sub-wallets designed for autonomous AI agents. They have per-transaction spending limits for safety and are funded from your main wallet.
89
+
90
+ #### `create_agentic_wallet`
91
+ Create a new agentic wallet.
92
+
93
+ | Parameter | Type | Required | Description |
94
+ |---|---|---|---|
95
+ | `label` | string | Yes | Label for the wallet (1-100 chars) |
96
+ | `spending_limit_cents` | number | No | Max spend per transaction in cents. Default: 10000 ($100) |
97
+
98
+ #### `fund_agentic_wallet`
99
+ Transfer funds from your main wallet to an agentic wallet.
100
+
101
+ | Parameter | Type | Required | Description |
102
+ |---|---|---|---|
103
+ | `wallet_id` | string | Yes | Agentic wallet UUID |
104
+ | `amount_cents` | number | Yes | Amount in cents (100-1000000) |
105
+
106
+ #### `check_agentic_balance`
107
+ Check an agentic wallet's balance and status.
108
+
109
+ | Parameter | Type | Required | Description |
110
+ |---|---|---|---|
111
+ | `wallet_id` | string | Yes | Agentic wallet UUID |
112
+
113
+ #### `list_agentic_wallets`
114
+ List all your agentic wallets with balances and status. No parameters.
115
+
116
+ #### `agentic_transactions`
117
+ View transaction history for an agentic wallet.
118
+
119
+ | Parameter | Type | Required | Description |
120
+ |---|---|---|---|
121
+ | `wallet_id` | string | Yes | Agentic wallet UUID |
122
+ | `limit` | number | No | Number of transactions (1-100). Default: 20 |
123
+
124
+ ### Team Tools
125
+
126
+ Teams enable shared wallet billing across multiple users. Owners and admins can manage members and create shared API keys.
127
+
128
+ #### `create_team`
129
+ Create a new team.
130
+
131
+ | Parameter | Type | Required | Description |
132
+ |---|---|---|---|
133
+ | `name` | string | Yes | Team name (1-100 chars) |
134
+ | `max_members` | number | No | Maximum members (1-1000). Default: unlimited |
135
+
136
+ #### `list_teams`
137
+ List all teams you belong to. No parameters.
138
+
139
+ #### `team_details`
140
+ Get detailed info about a team.
141
+
142
+ | Parameter | Type | Required | Description |
143
+ |---|---|---|---|
144
+ | `team_id` | string | Yes | Team UUID |
145
+
146
+ #### `team_fund`
147
+ Transfer funds from your personal wallet to a team wallet.
148
+
149
+ | Parameter | Type | Required | Description |
150
+ |---|---|---|---|
151
+ | `team_id` | string | Yes | Team UUID |
152
+ | `amount_cents` | number | Yes | Amount in cents (100-1000000) |
153
+
154
+ #### `team_create_key`
155
+ Create a shared API key billed to the team wallet.
156
+
157
+ | Parameter | Type | Required | Description |
158
+ |---|---|---|---|
159
+ | `team_id` | string | Yes | Team UUID |
160
+ | `label` | string | Yes | Key label (1-100 chars) |
161
+
162
+ #### `team_usage`
163
+ View team wallet transaction history.
164
+
165
+ | Parameter | Type | Required | Description |
166
+ |---|---|---|---|
167
+ | `team_id` | string | Yes | Team UUID |
168
+ | `limit` | number | No | Number of transactions (1-100). Default: 20 |
169
+
170
+ ## Usage Examples
171
+
172
+ ### Fetch a page through a US proxy
173
+ ```
174
+ Use proxied_fetch to get https://httpbin.org/ip through a US datacenter proxy
175
+ ```
176
+
177
+ ### Check your budget
178
+ ```
179
+ Check my DomiNode balance and tell me how much residential browsing I have left
180
+ ```
181
+
182
+ ### Set up a research team
183
+ ```
184
+ Create a team called "Web Research" with max 5 members, then fund it with $25
185
+ ```
186
+
187
+ ### Create an agent wallet for automated scraping
188
+ ```
189
+ Create an agentic wallet called "price-monitor" with a $5 spending limit, fund it with $10
190
+ ```
191
+
192
+ ### View usage breakdown
193
+ ```
194
+ Show my DomiNode usage for the last 7 days
195
+ ```
196
+
197
+ ### Fetch with residential proxy and geo-targeting
198
+ ```
199
+ Use proxied_fetch to get https://example.co.uk through a GB residential proxy
200
+ ```
201
+
202
+ ## Security
203
+
204
+ The plugin implements comprehensive security measures:
205
+
206
+ - **SSRF Protection**: All target URLs are validated before proxying. Private IPs (10.x, 172.16-31.x, 192.168.x, 127.x, etc.), localhost, `.local`/`.internal`/`.arpa` TLDs, and `.localhost` (RFC 6761) are blocked.
207
+ - **Non-standard IP Normalization**: Hex (0x7f000001), octal (0177.0.0.1), and decimal (2130706433) IP formats are normalized and blocked.
208
+ - **IPv6 Zone ID Stripping**: IPv6 zone IDs (e.g., `%25eth0`) are stripped before validation to prevent bypasses.
209
+ - **IPv4-mapped IPv6**: Addresses like `::ffff:127.0.0.1` are properly detected and blocked.
210
+ - **Embedded Credentials**: URLs containing `user:pass@host` are rejected.
211
+ - **CRLF Injection**: HTTP headers are validated for CR/LF/null bytes.
212
+ - **Credential Scrubbing**: API keys (`dn_live_*`, `dn_test_*`) are redacted from all error messages.
213
+ - **Response Truncation**: Response bodies are capped at 4000 characters to prevent LLM context overflow.
214
+ - **OFAC Compliance**: Cuba (CU), Iran (IR), North Korea (KP), Russia (RU), and Syria (SY) are blocked as geo-targeting destinations.
215
+ - **Prototype Pollution Prevention**: `__proto__`, `constructor`, and `prototype` keys are stripped from parsed JSON.
216
+ - **Input Sanitization**: Labels and names are validated for control characters and length limits.
217
+ - **Integer Validation**: Monetary amounts are validated as integers within safe bounds.
218
+
219
+ ## API Endpoints Used
220
+
221
+ | Tool | Method | Endpoint |
222
+ |---|---|---|
223
+ | `proxied_fetch` | POST | `/api/proxy/fetch` |
224
+ | `check_balance` | GET | `/api/wallet` |
225
+ | `check_usage` | GET | `/api/usage` |
226
+ | `get_proxy_config` | GET | `/api/proxy/config` |
227
+ | `list_sessions` | GET | `/api/sessions/active` |
228
+ | `create_agentic_wallet` | POST | `/api/agent-wallet` |
229
+ | `fund_agentic_wallet` | POST | `/api/agent-wallet/:id/fund` |
230
+ | `check_agentic_balance` | GET | `/api/agent-wallet/:id` |
231
+ | `list_agentic_wallets` | GET | `/api/agent-wallet` |
232
+ | `agentic_transactions` | GET | `/api/agent-wallet/:id/transactions` |
233
+ | `create_team` | POST | `/api/teams` |
234
+ | `list_teams` | GET | `/api/teams` |
235
+ | `team_details` | GET | `/api/teams/:id` |
236
+ | `team_fund` | POST | `/api/teams/:id/wallet/fund` |
237
+ | `team_create_key` | POST | `/api/teams/:id/keys` |
238
+ | `team_usage` | GET | `/api/teams/:id/wallet/transactions` |
239
+
240
+ ## Requirements
241
+
242
+ - Node.js 18+ (uses native `fetch`)
243
+ - OpenClaw runtime with `jiti` support
244
+ - DomiNode API key with funded wallet
245
+
246
+ ## License
247
+
248
+ MIT
@@ -0,0 +1,64 @@
1
+ /**
2
+ * DomiNode OpenClaw Plugin
3
+ *
4
+ * Implements 24 tools for interacting with DomiNode's rotating proxy service
5
+ * directly from OpenClaw AI coding sessions.
6
+ *
7
+ * Uses native fetch (no external dependencies). Runs via jiti runtime.
8
+ *
9
+ * Security:
10
+ * - Full SSRF protection (private IP blocking, DNS rebinding, .localhost, embedded creds)
11
+ * - Credential scrubbing in error messages
12
+ * - Response truncation at 4000 chars for LLM context efficiency
13
+ * - OFAC sanctioned country validation
14
+ */
15
+ interface ToolDefinition {
16
+ name: string;
17
+ description: string;
18
+ parameters: Record<string, ParameterDef>;
19
+ execute: (args: Record<string, unknown>) => Promise<string>;
20
+ }
21
+ interface ParameterDef {
22
+ type: string;
23
+ description: string;
24
+ required?: boolean;
25
+ enum?: string[];
26
+ default?: unknown;
27
+ }
28
+ /** Remove any dn_live_* or dn_test_* tokens from error messages. */
29
+ declare function scrubCredentials(msg: string): string;
30
+ declare function truncate(text: string, max?: number): string;
31
+ /**
32
+ * Normalize non-standard IPv4 representations to dotted-decimal.
33
+ * Handles: decimal integers (2130706433), hex (0x7f000001), octal octets (0177.0.0.1).
34
+ */
35
+ declare function normalizeIpv4(hostname: string): string | null;
36
+ declare function isPrivateIp(hostname: string): boolean;
37
+ /**
38
+ * Validate a URL for safety before proxying.
39
+ * Blocks: private IPs, localhost, .local/.internal/.arpa, embedded credentials, non-http(s).
40
+ */
41
+ declare function validateTargetUrl(url: string): URL;
42
+ /**
43
+ * Validate a country code: must be 2 uppercase letters and not OFAC sanctioned.
44
+ */
45
+ declare function validateCountry(country: string | undefined): string | undefined;
46
+ /**
47
+ * Validate a UUID string.
48
+ */
49
+ declare function validateUuid(id: string, label: string): string;
50
+ declare function stripDangerousKeys(obj: unknown, depth?: number): void;
51
+ declare function formatBytes(bytes: number): string;
52
+ declare function formatCents(cents: number): string;
53
+ export declare const tools: ToolDefinition[];
54
+ /**
55
+ * Plugin metadata for OpenClaw discovery.
56
+ */
57
+ export declare const plugin: {
58
+ name: string;
59
+ version: string;
60
+ description: string;
61
+ tools: ToolDefinition[];
62
+ };
63
+ export default plugin;
64
+ export { isPrivateIp, validateTargetUrl, validateCountry, validateUuid, normalizeIpv4, stripDangerousKeys, scrubCredentials, truncate, formatBytes, formatCents, };