forked from ProxyShard/ShardBrowser
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.yaml
More file actions
1015 lines (962 loc) · 35.8 KB
/
Copy pathopenapi.yaml
File metadata and controls
1015 lines (962 loc) · 35.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.0.3
info:
title: ShardX Launcher — Automation API
version: "0.1.0"
description: |
Local HTTP API for automating the ShardX anti-detect browser launcher:
generate fingerprints, create/launch/close profiles, and obtain a Chrome
DevTools Protocol (CDP) WebSocket endpoint to drive a launched profile
with Puppeteer / Playwright.
## Binding & lifecycle
The server runs inside the launcher app, bound to **127.0.0.1** only,
on the port configured in *Settings → Automation API* (default **40325**).
It is **not** reachable from other hosts. Enabling/port changes take
effect after the app restarts.
## Authentication
Every endpoint except `GET /health` requires a **Bearer JWT** (HS256,
signed with the launcher's stored secret):
Authorization: Bearer <token>
The permanent token is shown in *Settings → Automation API* (copy it
from there). Pressing **Regenerate token** rotates the signing secret
live — the new token works immediately and every previously issued
token is invalidated at once. There is no separate API key and no
token-minting endpoint: the token itself is the credential.
Missing/invalid token → `401` with an empty body.
## Typical flow
1. `GET /fingerprint/new/{platform}` → a fully uniquified fingerprint
(random platform_version, host-aware CPU/RAM, clamped screen,
library noise prefs), **not** persisted.
2. Optionally edit the returned `fingerprint` object (e.g. flip
`noise.fonts.enabled`, set `webrtc`, tweak `navigator`).
3. `POST /profiles` (or `POST /folders/{folder}/profiles`) with that
object as `fingerprint` → the launcher stores it **verbatim**
(create never re-randomizes).
4. `POST /profiles/{id}/start` → returns the CDP endpoint; connect with
`browserWSEndpoint = cdp.web_socket_debugger_url`.
5. `POST /profiles/{id}/stop` when done.
## Proxies & QUIC/WebRTC
On **every** launch (UI or API), before the browser starts, the bound
proxy is probed live for UDP-relay (SOCKS5 UDP_ASSOCIATE). If UDP works,
QUIC is enabled and WebRTC may use the proxied UDP relay; otherwise QUIC
is disabled and WebRTC collapses to TCP-only so the real IP can't leak.
Timezone/locale/geo `auto` fields are resolved live through the proxy at
launch too. Passing `proxy` (string) on a persistent create adds it to
the store and full-tests it up front; a temporary profile keeps it inline.
## Temporary profiles
`POST /profiles/temporary` creates a profile flagged `temporary`: it is
hidden from `GET /profiles` and from the launcher UI, and is deleted
(config + user-data-dir) automatically when its browser closes. If the
app crashes while one is open, it is purged on the next app start.
## Fingerprint object
The `fingerprint` returned by `GET /fingerprint/new*` and accepted by
the create endpoints is the launcher's native FingerprintConfig. It is
round-tripped verbatim, so the schema below documents the common
sub-objects but is intentionally open (`additionalProperties: true`).
## MCP server
A companion **MCP** (Model Context Protocol) server lets an AI client
drive the launcher through *this* API plus a profile's browser over
CDP. It is a separate Node process — **not** part of this HTTP API and
not hosted by it. Get it from the launcher (**Settings → MCP server →
Download MCP server**, or the sidebar "Download MCP" button), which
saves the source to a folder you choose; or from the repo at
`rust/shardx-launcher/mcp/`.
Under the hood it just calls this API: configure it with
`SHARDX_API` (this base URL) and `SHARDX_TOKEN` (the Bearer token from
*Settings → Automation API*). It exposes:
- **API tools** — thin wrappers over the endpoints below
(profiles, fingerprints, proxies, folders, cookies, start/stop).
- **Browser tools** (patchright over CDP) — `browser_navigate`,
`browser_evaluate`, `browser_screenshot`, `browser_click`,
`browser_fill`, tabs, waits, etc., targeting a profile started via
`POST /profiles/{id}/start` (which returns the CDP endpoint).
Run it standalone over **stdio** (the client spawns it) or, with
`MCP_HTTP_PORT` set, over HTTP at `127.0.0.1:<port>/mcp`. See the MCP
server's README for setup. (The launcher only downloads it; it does
not run it.)
servers:
- url: http://127.0.0.1:40325
description: Local launcher (default port; change in Settings)
security:
- bearerAuth: []
tags:
- name: System
- name: Fingerprints
- name: Profiles
- name: Folders
- name: Proxies
paths:
/health:
get:
tags: [System]
summary: Liveness probe
description: Returns basic server info. The only endpoint that does **not** require auth.
security: []
responses:
"200":
description: Server is up.
content:
application/json:
schema:
type: object
properties:
ok: { type: boolean, example: true }
name: { type: string, example: shardx-launcher }
version: { type: string, example: "0.1.0" }
/fingerprint/new:
get:
tags: [Fingerprints]
summary: Generate a new fingerprint (host OS)
description: |
Returns a fully uniquified fingerprint for the **host** operating
system, without persisting it. Equivalent to
`/fingerprint/new/{platform}` with the launcher host's platform.
responses:
"200":
description: A uniquified, unsaved fingerprint.
content:
application/json:
schema:
$ref: "#/components/schemas/FingerprintEnvelope"
"401": { $ref: "#/components/responses/Unauthorized" }
"404":
description: The fingerprint library is empty.
content:
application/json:
schema: { $ref: "#/components/schemas/Error" }
/fingerprint/new/{platform}:
get:
tags: [Fingerprints]
summary: Generate a new fingerprint for a platform
description: |
Picks a random library fingerprint matching `platform`, then
uniquifies it: a fresh Sec-CH-UA `platform_version`, host-aware
`hardware_concurrency`/`device_memory` (never claims more than the
real machine), and a screen clamped to the real display. Returned
unsaved — feed it to a create endpoint as `fingerprint`.
parameters:
- name: platform
in: path
required: true
description: Case-insensitive; `win`/`osx`/`darwin` aliases accepted.
schema:
type: string
enum: [Windows, macOS, Linux]
responses:
"200":
description: A uniquified, unsaved fingerprint.
content:
application/json:
schema:
$ref: "#/components/schemas/FingerprintEnvelope"
"401": { $ref: "#/components/responses/Unauthorized" }
"404":
description: No matching fingerprint and the library is empty.
content:
application/json:
schema: { $ref: "#/components/schemas/Error" }
/profiles:
get:
tags: [Profiles]
summary: List profiles
description: |
Lists persistent profiles (temporary profiles are hidden), newest
first, pinned on top. Each entry is enriched with live run state.
responses:
"200":
description: Profile list.
content:
application/json:
schema:
type: array
items: { $ref: "#/components/schemas/ProfileListItem" }
"401": { $ref: "#/components/responses/Unauthorized" }
post:
tags: [Profiles]
summary: Create a profile
description: |
Persists a profile from a client-supplied `fingerprint` **exactly as
given** (no re-randomization — uniquification already happened in
`/fingerprint/new`). Use `folder` to file it; bind a proxy by stored
`proxy_id` or attach one inline via `proxy` (a string that is NOT
saved to the proxy store).
requestBody:
required: true
content:
application/json:
schema: { $ref: "#/components/schemas/CreateProfileRequest" }
responses:
"200":
description: Created profile metadata.
content:
application/json:
schema: { $ref: "#/components/schemas/ProfileMeta" }
"400":
description: Missing/!object `fingerprint`, or an unparseable proxy string.
content:
application/json:
schema: { $ref: "#/components/schemas/Error" }
"401": { $ref: "#/components/responses/Unauthorized" }
/profiles/temporary:
post:
tags: [Profiles]
summary: Create a temporary profile
description: |
Creates a profile from a random (or specified) library fingerprint,
uniquified like `/fingerprint/new` and stored verbatim, flagged
`temporary`: hidden from listings and **auto-deleted when its
browser closes** (or purged on next app start after a crash). Pair
with `POST /profiles/{id}/start`.
requestBody:
required: false
content:
application/json:
schema: { $ref: "#/components/schemas/TempProfileRequest" }
responses:
"200":
description: Created temporary profile.
content:
application/json:
schema:
type: object
properties:
id: { type: string, format: uuid }
name: { type: string }
fingerprint_id:
type: string
description: The library entry the profile was generated from.
temporary: { type: boolean, example: true }
proxy_inline:
type: boolean
description: Whether an inline proxy string was attached.
"400":
description: Unparseable proxy string.
content:
application/json:
schema: { $ref: "#/components/schemas/Error" }
"401": { $ref: "#/components/responses/Unauthorized" }
"404":
description: No matching fingerprint / empty library.
content:
application/json:
schema: { $ref: "#/components/schemas/Error" }
/profiles/{id}:
get:
tags: [Profiles]
summary: Get a profile
description: |
Returns the full stored profile: the `_meta` envelope plus the
flattened FingerprintConfig. If the profile is running, `running`
and `cdp` are added.
parameters:
- $ref: "#/components/parameters/ProfileId"
responses:
"200":
description: The stored profile.
content:
application/json:
schema: { $ref: "#/components/schemas/StoredProfile" }
"401": { $ref: "#/components/responses/Unauthorized" }
"404":
description: No such profile.
content:
application/json:
schema: { $ref: "#/components/schemas/Error" }
delete:
tags: [Profiles]
summary: Delete a profile
description: Removes the profile config and its user-data-dir.
parameters:
- $ref: "#/components/parameters/ProfileId"
responses:
"200":
description: Deleted.
content:
application/json:
schema:
type: object
properties:
deleted: { type: boolean, example: true }
id: { type: string, format: uuid }
"401": { $ref: "#/components/responses/Unauthorized" }
"500":
description: Deletion failed.
content:
application/json:
schema: { $ref: "#/components/schemas/Error" }
patch:
tags: [Profiles]
summary: Edit a profile
description: |
Updates only the provided fields. When `fingerprint` is given it
REPLACES the stored fingerprint verbatim (no re-randomization).
`folder: ""` unfiles the profile; `proxy_id: ""` unbinds the proxy;
a `proxy` string is stored (deduped) + full-tested, then bound.
Returns the updated stored profile.
parameters:
- $ref: "#/components/parameters/ProfileId"
requestBody:
required: true
content:
application/json:
schema: { $ref: "#/components/schemas/EditProfileRequest" }
responses:
"200":
description: Updated stored profile.
content:
application/json:
schema: { $ref: "#/components/schemas/StoredProfile" }
"400":
description: Bad fingerprint (not an object) or unparseable proxy.
content:
application/json:
schema: { $ref: "#/components/schemas/Error" }
"401": { $ref: "#/components/responses/Unauthorized" }
"404":
description: No such profile.
content:
application/json:
schema: { $ref: "#/components/schemas/Error" }
/profiles/{id}/start:
post:
tags: [Profiles]
summary: Launch a profile (with CDP)
description: |
Spawns the ShardX browser for the profile with remote-debugging
enabled, resolves any `auto` timezone/locale/geo from the bound
proxy, and returns the CDP endpoint once Chrome has written its
DevToolsActivePort. CDP is enabled **only** on API launches (UI
launches stay debugging-free for anti-detect). `cdp` is `null` if
the endpoint couldn't be read within the timeout. Works for both
regular and temporary profiles.
parameters:
- $ref: "#/components/parameters/ProfileId"
requestBody:
required: false
description: Optional. Empty body launches headed.
content:
application/json:
schema:
type: object
properties:
headless:
type: boolean
default: false
description: Launch headless (--headless=new).
responses:
"200":
description: Launched.
content:
application/json:
schema:
type: object
properties:
profile_id: { type: string }
pid: { type: integer, format: int64, description: OS process id. }
headless: { type: boolean }
cdp:
nullable: true
allOf: [{ $ref: "#/components/schemas/CdpInfo" }]
"401": { $ref: "#/components/responses/Unauthorized" }
"500":
description: Binary not configured / spawn failed.
content:
application/json:
schema: { $ref: "#/components/schemas/Error" }
/profiles/{id}/stop:
post:
tags: [Profiles]
summary: Stop a profile
description: |
Sends the browser a graceful shutdown (SIGTERM on Unix; 5s grace
then SIGKILL). Temporary profiles are deleted as part of close.
`stopped` is `false` if the profile wasn't running.
parameters:
- $ref: "#/components/parameters/ProfileId"
responses:
"200":
description: Stop requested.
content:
application/json:
schema:
type: object
properties:
profile_id: { type: string }
stopped: { type: boolean }
"401": { $ref: "#/components/responses/Unauthorized" }
/profiles/{id}/cookies:
get:
tags: [Profiles]
summary: Export cookies
description: |
Reads the profile's Chromium cookie store and returns all cookies
**decrypted**. Works whether the profile is running or stopped.
Empty array if the profile has never launched.
parameters:
- $ref: "#/components/parameters/ProfileId"
responses:
"200":
description: Cookies.
content:
application/json:
schema:
type: object
properties:
cookies:
type: array
items: { $ref: "#/components/schemas/Cookie" }
"401": { $ref: "#/components/responses/Unauthorized" }
"500":
description: Cookie DB read/decrypt failed.
content:
application/json:
schema: { $ref: "#/components/schemas/Error" }
post:
tags: [Profiles]
summary: Import cookies
description: |
Writes cookies into the profile's cookie store (re-encrypting to
Chromium's v10 scheme). The profile **must be stopped** — a running
browser rewrites the store on exit and would clobber the import.
parameters:
- $ref: "#/components/parameters/ProfileId"
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [cookies]
properties:
cookies:
type: array
items: { $ref: "#/components/schemas/Cookie" }
responses:
"200":
description: Imported.
content:
application/json:
schema:
type: object
properties:
imported: { type: integer, description: Number of cookies written. }
"401": { $ref: "#/components/responses/Unauthorized" }
"409":
description: Profile is running — stop it first.
content:
application/json:
schema: { $ref: "#/components/schemas/Error" }
"500":
description: Cookie DB write failed.
content:
application/json:
schema: { $ref: "#/components/schemas/Error" }
/folders:
get:
tags: [Folders]
summary: List folders
description: Distinct, non-empty folder tags across persistent profiles.
responses:
"200":
description: Folder names.
content:
application/json:
schema:
type: array
items: { type: string }
example: ["work", "scrapers"]
"401": { $ref: "#/components/responses/Unauthorized" }
/folders/{folder}:
patch:
tags: [Folders]
summary: Rename a folder
description: Retags every profile in the folder. Returns the count.
parameters:
- name: folder
in: path
required: true
schema: { type: string }
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [name]
properties:
name: { type: string, description: New folder name. }
responses:
"200":
description: Renamed.
content:
application/json:
schema:
type: object
properties:
renamed_to: { type: string }
profiles: { type: integer, description: Profiles retagged. }
"401": { $ref: "#/components/responses/Unauthorized" }
delete:
tags: [Folders]
summary: Delete a folder
description: |
Deletes the folder tag. With `delete_profiles=true` the profiles in
it are deleted too; otherwise they're unfiled (moved to "All").
parameters:
- name: folder
in: path
required: true
schema: { type: string }
- name: delete_profiles
in: query
required: false
description: Delete the profiles in the folder (default false = unfile).
schema: { type: boolean, default: false }
responses:
"200":
description: Deleted.
content:
application/json:
schema:
type: object
properties:
deleted_folder: { type: string }
delete_profiles: { type: boolean }
profiles: { type: integer, description: Profiles affected. }
"401": { $ref: "#/components/responses/Unauthorized" }
/folders/{folder}/profiles:
post:
tags: [Folders]
summary: Create a profile in a folder
description: |
Same as `POST /profiles`, but the folder comes from the path
(overriding any `folder` in the body).
parameters:
- name: folder
in: path
required: true
schema: { type: string }
requestBody:
required: true
content:
application/json:
schema: { $ref: "#/components/schemas/CreateProfileRequest" }
responses:
"200":
description: Created profile metadata.
content:
application/json:
schema: { $ref: "#/components/schemas/ProfileMeta" }
"400":
description: Missing/!object `fingerprint`, or an unparseable proxy string.
content:
application/json:
schema: { $ref: "#/components/schemas/Error" }
"401": { $ref: "#/components/responses/Unauthorized" }
/fingerprints:
get:
tags: [Fingerprints]
summary: List library fingerprints
description: The on-disk fingerprint library (GPU presets) the launcher ships/imports.
responses:
"200":
description: Library entries.
content:
application/json:
schema:
type: array
items: { $ref: "#/components/schemas/LibraryEntry" }
"401": { $ref: "#/components/responses/Unauthorized" }
/running:
get:
tags: [Profiles]
summary: List running profiles
description: Profiles with a live browser process, including the CDP endpoint when launched via the API.
responses:
"200":
description: Running profiles.
content:
application/json:
schema:
type: array
items: { $ref: "#/components/schemas/RunningProfile" }
"401": { $ref: "#/components/responses/Unauthorized" }
/proxies:
get:
tags: [Proxies]
summary: List stored proxies
description: Proxies saved in the launcher store. **Credentials (username/password) are never returned.**
responses:
"200":
description: Proxy summaries.
content:
application/json:
schema:
type: array
items: { $ref: "#/components/schemas/ProxySummary" }
"401": { $ref: "#/components/responses/Unauthorized" }
post:
tags: [Proxies]
summary: Add a proxy
description: |
Adds a proxy to the store (deduped by endpoint). Pass `proxy` as a
string, or explicit `host`/`port` (+ `kind`/`username`/`password`).
requestBody:
required: true
content:
application/json:
schema: { $ref: "#/components/schemas/AddProxyRequest" }
responses:
"200":
description: Stored proxy summary.
content:
application/json:
schema: { $ref: "#/components/schemas/ProxySummary" }
"400":
description: Unparseable proxy / missing host+port.
content:
application/json:
schema: { $ref: "#/components/schemas/Error" }
"401": { $ref: "#/components/responses/Unauthorized" }
/proxies/{id}:
delete:
tags: [Proxies]
summary: Delete a proxy
parameters:
- name: id
in: path
required: true
schema: { type: string }
responses:
"200":
description: Deleted.
content:
application/json:
schema:
type: object
properties:
deleted: { type: boolean, example: true }
id: { type: string }
"401": { $ref: "#/components/responses/Unauthorized" }
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
description: Permanent JWT from Settings → Automation API.
parameters:
ProfileId:
name: id
in: path
required: true
description: Profile UUID.
schema: { type: string, format: uuid }
responses:
Unauthorized:
description: Missing or invalid Bearer token.
schemas:
Error:
type: object
properties:
error: { type: string }
required: [error]
FingerprintEnvelope:
type: object
properties:
fingerprint: { $ref: "#/components/schemas/Fingerprint" }
required: [fingerprint]
Fingerprint:
type: object
description: |
Native FingerprintConfig. Documented sub-objects are the common
ones; the object is open and stored verbatim by the create
endpoints, so any field present here is round-tripped.
additionalProperties: true
properties:
name: { type: string }
notes: { type: string }
seed:
type: integer
description: 0 = overrides-only mode (the common case).
navigator:
type: object
additionalProperties: true
properties:
user_agent: { type: string }
platform: { type: string, example: "Win32" }
hardware_concurrency: { type: integer, example: 12 }
device_memory: { type: integer, enum: [8, 16, 32], example: 16 }
language: { type: string }
do_not_track: { type: boolean }
screen:
type: object
additionalProperties: true
properties:
width: { type: integer }
height: { type: integer }
avail_width: { type: integer }
avail_height: { type: integer }
color_depth: { type: integer, example: 24 }
device_pixel_ratio: { type: number, example: 2 }
color_gamut: { type: string, enum: ["", srgb, p3, rec2020] }
client_hints:
type: object
description: Sec-CH-UA family (browser.vision calls this `hints`).
additionalProperties: true
properties:
platform: { type: string }
platform_version: { type: string }
architecture: { type: string, example: "x86" }
bitness: { type: string, example: "64" }
mobile: { type: boolean }
webgl:
type: object
additionalProperties: true
properties:
unmasked_vendor: { type: string }
unmasked_renderer: { type: string }
webgpu:
type: object
additionalProperties: true
webrtc:
type: string
description: WebRTC handling mode.
enum: [auto, tcp_only, block]
noise:
$ref: "#/components/schemas/NoisePrefs"
network:
type: object
properties:
blocked_ports:
type: array
items: { type: integer }
description: Local-network port-scan defense (ports_protection).
timezone:
type: string
description: IANA name, or "auto" to resolve from the bound proxy at launch.
NoisePrefs:
type: object
description: |
Per-vector anti-fingerprint noise. Each block is `{enabled, seed}`
(+ feature-specific knobs). `enabled:false` = pass-through.
properties:
canvas: { $ref: "#/components/schemas/NoiseBlock" }
webgl:
allOf: [{ $ref: "#/components/schemas/NoiseBlock" }]
properties:
intensity: { type: number }
audio:
allOf: [{ $ref: "#/components/schemas/NoiseBlock" }]
properties:
intensity: { type: number }
client_rects:
allOf: [{ $ref: "#/components/schemas/NoiseBlock" }]
properties:
max_offset: { type: number }
sensors: { $ref: "#/components/schemas/NoiseBlock" }
fonts:
allOf: [{ $ref: "#/components/schemas/NoiseBlock" }]
description: |
`enabled:true` hides a small deterministic per-profile subset of
non-essential fonts (real host fonts otherwise pass through).
NoiseBlock:
type: object
properties:
enabled: { type: boolean }
seed:
type: integer
description: Per-profile entropy; 0 = derive automatically.
CreateProfileRequest:
type: object
required: [fingerprint]
properties:
name: { type: string }
notes: { type: string }
proxy_id:
type: string
description: Bind a proxy already in the store (by id).
proxy:
type: string
description: |
Attach a proxy by string (`host:port:user:pass` or
`scheme://user:pass@host:port`). On a **persistent** profile it is
added to the proxy store (deduped by endpoint) and full-tested
(UDP + geo), then bound by id — so it appears in the proxy list
and QUIC/WebRTC gating has a cached result. On a **temporary**
profile it is attached inline (not stored). Ignored if `proxy_id`
is set.
example: "socks5://user:pass@1.2.3.4:1080"
folder:
type: string
description: Folder tag (ignored on /folders/{folder}/profiles, which wins).
fingerprint:
allOf: [{ $ref: "#/components/schemas/Fingerprint" }]
description: Stored verbatim. Get one from /fingerprint/new and edit as needed.
EditProfileRequest:
type: object
description: All fields optional — only what's present is changed.
properties:
name: { type: string }
notes: { type: string }
folder: { type: string, description: '"" unfiles (moves to All).' }
proxy_id: { type: string, description: '"" unbinds the proxy.' }
proxy:
type: string
description: Proxy string — stored (deduped) + full-tested, then bound.
fingerprint:
allOf: [{ $ref: "#/components/schemas/Fingerprint" }]
description: When present, REPLACES the stored fingerprint verbatim.
TempProfileRequest:
type: object
properties:
fingerprint_id:
type: string
description: Library entry to base off; random match for `platform` when omitted.
platform:
type: string
enum: [Windows, macOS, Linux]
description: Used to pick a random fingerprint when `fingerprint_id` is omitted; host OS when both omitted.
proxy:
type: string
description: Inline proxy string (not saved to the store).
name: { type: string }
folder: { type: string }
ProfileMeta:
type: object
description: Launcher-facing profile metadata (returned by create).
properties:
id: { type: string, format: uuid }
name: { type: string }
notes: { type: string }
proxy_id: { type: string, nullable: true }
last_launched_at: { type: string, nullable: true, description: ISO-8601 or null. }
created_at: { type: string, nullable: true }
pinned: { type: boolean }
folder: { type: string }
ProfileListItem:
allOf:
- $ref: "#/components/schemas/ProfileMeta"
- type: object
properties:
running: { type: boolean }
pid: { type: integer, format: int64, nullable: true }
cdp:
nullable: true
allOf: [{ $ref: "#/components/schemas/CdpInfo" }]
StoredProfile:
type: object
description: |
Full on-disk profile: the `_meta` envelope plus the flattened
FingerprintConfig (all `Fingerprint` fields appear at the top
level). `running`/`cdp` are present only while the profile runs.
additionalProperties: true
properties:
_meta:
type: object
properties:
id: { type: string, format: uuid }
proxy_id: { type: string, nullable: true }
inline_proxy:
nullable: true
allOf: [{ $ref: "#/components/schemas/ProxyEntry" }]
last_launched_at: { type: string, nullable: true }
created_at: { type: string, nullable: true }
pinned: { type: boolean }
folder: { type: string }
temporary: { type: boolean }
running: { type: boolean }
cdp:
nullable: true
allOf: [{ $ref: "#/components/schemas/CdpInfo" }]
CdpInfo:
type: object
description: Chrome DevTools Protocol endpoint of a running profile.
properties:
port: { type: integer, description: Chrome-chosen remote-debugging port. }
http_url:
type: string
example: "http://127.0.0.1:53217"
description: REST base (/json, /json/version).
web_socket_debugger_url:
type: string
example: "ws://127.0.0.1:53217/devtools/browser/ab12-..."
description: Browser-level WS endpoint for Puppeteer/Playwright `connect`.
RunningProfile:
type: object
properties:
profile_id: { type: string }
pid: { type: integer, format: int64 }
cdp:
nullable: true
allOf: [{ $ref: "#/components/schemas/CdpInfo" }]
LibraryEntry:
type: object
properties:
id: { type: string }
label: { type: string }
platform: { type: string, enum: [Windows, macOS, Linux] }
chrome: { type: string, description: Chrome version string. }
gpu: { type: string }
builtin: { type: boolean, description: Part of the bundled starter set. }
AddProxyRequest:
type: object
description: A proxy string OR explicit fields (string wins).
properties:
proxy:
type: string
description: "`scheme://user:pass@host:port` or `host:port:user:pass`."
kind: { type: string, enum: [socks5, http, https] }
host: { type: string }
port: { type: integer }
username: { type: string }
password: { type: string }
name: { type: string }
country: { type: string }
notes: { type: string }
ProxySummary:
type: object
description: Stored proxy without credentials.
properties:
id: { type: string }
name: { type: string }
kind: { type: string, enum: [socks5, http, https] }
host: { type: string }
port: { type: integer }
country: { type: string, description: Informational tag (e.g. "US"). }
Cookie:
type: object
description: |
A cookie in a tool-friendly shape (compatible with EditThisCookie /
Puppeteer exports — `httpOnly`/`sameSite` are accepted as aliases on
import).
required: [domain, name, value]
properties:
domain:
type: string
description: Cookie host (Chromium `host_key`), e.g. ".example.com".
name: { type: string }
value: { type: string }
path: { type: string, default: "/" }
expires:
type: number
nullable: true
description: Unix seconds; null/absent = session cookie.
secure: { type: boolean, default: false }
http_only: { type: boolean, default: false }
same_site:
type: string
enum: [Strict, Lax, None, unspecified]