Folders
Список папок
http://127.0.0.1:40325/foldersУнікальні непорожні теги папок серед постійних профілів.
Постійний JWT з Settings → Automation API.
200Назви папок.application/json
401Відсутній або недійсний Bearer-токен.
/foldersGET /folders HTTP/1.1
Host: 127.0.0.1:40325
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*curl -X GET 'http://127.0.0.1:40325/folders' \
-H 'Authorization: Bearer YOUR_SECRET_TOKEN'import requests
# Постійний JWT з Settings → Automation API.
token = "YOUR_SECRET_TOKEN"
url = "http://127.0.0.1:40325/folders"
headers = {
"Authorization": f"Bearer {token}",
}
response = requests.get(url, headers=headers, timeout=30)
response.raise_for_status()
print(response.status_code)
print(response.text)// Постійний JWT з Settings → Automation API.
const token = "YOUR_SECRET_TOKEN";
const url = "http://127.0.0.1:40325/folders";
const response = await fetch(url, {
method: "GET",
headers: {
"Authorization": `Bearer ${token}`,
},
});
console.log(response.status);
console.log(await response.text());package main
import (
"fmt"
"io"
"log"
"net/http"
)
func main() {
// Постійний JWT з Settings → Automation API.
token := "YOUR_SECRET_TOKEN"
url := "http://127.0.0.1:40325/folders"
req, err := http.NewRequest("GET", url, nil)
if err != nil {
log.Fatal(err)
}
req.Header.Set("Authorization", "Bearer "+token)
resp, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
out, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal(err)
}
fmt.Println(resp.Status)
fmt.Println(string(out))
}// Cargo.toml: reqwest = { version = "0.12", features = ["json"] }, tokio = { version = "1", features = ["full"] }
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Постійний JWT з Settings → Automation API.
let token = "YOUR_SECRET_TOKEN";
let client = reqwest::Client::new();
let response = client
.get("http://127.0.0.1:40325/folders")
.header("Authorization", format!("Bearer {token}"))
.send()
.await?;
println!("{}", response.status());
println!("{}", response.text().await?);
Ok(())
}using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
class Program
{
static async Task Main()
{
// Постійний JWT з Settings → Automation API.
var token = "YOUR_SECRET_TOKEN";
using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
var request = new HttpRequestMessage(HttpMethod.Get, "http://127.0.0.1:40325/folders");
var response = await client.SendAsync(request);
Console.WriteLine((int)response.StatusCode);
Console.WriteLine(await response.Content.ReadAsStringAsync());
}
}// build: c++ -std=c++17 main.cpp -lcurl
#include <curl/curl.h>
#include <iostream>
#include <string>
static size_t write_cb(char *ptr, size_t size, size_t nmemb, void *userdata) {
static_cast<std::string *>(userdata)->append(ptr, size * nmemb);
return size * nmemb;
}
int main() {
// Постійний JWT з Settings → Automation API.
const std::string token = "YOUR_SECRET_TOKEN";
curl_global_init(CURL_GLOBAL_DEFAULT);
CURL *curl = curl_easy_init();
if (!curl) {
std::cerr << "curl_easy_init failed\n";
curl_global_cleanup();
return 1;
}
struct curl_slist *headers = nullptr;
headers = curl_slist_append(headers, ("Authorization: Bearer " + token).c_str());
std::string response;
curl_easy_setopt(curl, CURLOPT_URL, "http://127.0.0.1:40325/folders");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_cb);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);
const CURLcode rc = curl_easy_perform(curl);
if (rc != CURLE_OK) {
std::cerr << curl_easy_strerror(rc) << "\n";
} else {
long status = 0;
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &status);
std::cout << status << "\n" << response << "\n";
}
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
curl_global_cleanup();
return rc == CURLE_OK ? 0 : 1;
}[
"work",
"scrapers"
]Перейменувати папку
http://127.0.0.1:40325/folders/{folder}Перевішує тег на всіх профілях у папці. Повертає кількість задіяних профілів.
Постійний JWT з Settings → Automation API.
Нова назва папки.
200Перейменовано.application/json
Кількість перетегованих профілів.
401Відсутній або недійсний Bearer-токен.
/folders/textPATCH /folders/text HTTP/1.1
Host: 127.0.0.1:40325
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
{
"name": "text"
}curl -X PATCH 'http://127.0.0.1:40325/folders/text' \
-H 'Authorization: Bearer YOUR_SECRET_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"name":"text"}'import requests
# Постійний JWT з Settings → Automation API.
token = "YOUR_SECRET_TOKEN"
url = "http://127.0.0.1:40325/folders/text"
headers = {
"Authorization": f"Bearer {token}",
}
payload = {
"name": "text",
}
response = requests.patch(url, headers=headers, json=payload, timeout=30)
response.raise_for_status()
print(response.status_code)
print(response.text)// Постійний JWT з Settings → Automation API.
const token = "YOUR_SECRET_TOKEN";
const url = "http://127.0.0.1:40325/folders/text";
const payload = {
"name": "text"
};
const response = await fetch(url, {
method: "PATCH",
headers: {
"Authorization": `Bearer ${token}`,
"Content-Type": "application/json",
},
body: JSON.stringify(payload),
});
console.log(response.status);
console.log(await response.text());package main
import (
"bytes"
"fmt"
"io"
"log"
"net/http"
)
func main() {
// Постійний JWT з Settings → Automation API.
token := "YOUR_SECRET_TOKEN"
url := "http://127.0.0.1:40325/folders/text"
body := bytes.NewBufferString(`{
"name": "text"
}`)
req, err := http.NewRequest("PATCH", url, body)
if err != nil {
log.Fatal(err)
}
req.Header.Set("Authorization", "Bearer "+token)
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
out, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal(err)
}
fmt.Println(resp.Status)
fmt.Println(string(out))
}// Cargo.toml: reqwest = { version = "0.12", features = ["json"] }, tokio = { version = "1", features = ["full"] }, serde_json = "1"
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Постійний JWT з Settings → Automation API.
let token = "YOUR_SECRET_TOKEN";
let client = reqwest::Client::new();
let response = client
.patch("http://127.0.0.1:40325/folders/text")
.header("Authorization", format!("Bearer {token}"))
.json(&serde_json::json!({
"name": "text"
}))
.send()
.await?;
println!("{}", response.status());
println!("{}", response.text().await?);
Ok(())
}using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
class Program
{
static async Task Main()
{
// Постійний JWT з Settings → Automation API.
var token = "YOUR_SECRET_TOKEN";
using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
var request = new HttpRequestMessage(HttpMethod.Patch, "http://127.0.0.1:40325/folders/text");
request.Content = new StringContent("""
{
"name": "text"
}
""", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine((int)response.StatusCode);
Console.WriteLine(await response.Content.ReadAsStringAsync());
}
}// build: c++ -std=c++17 main.cpp -lcurl
#include <curl/curl.h>
#include <iostream>
#include <string>
static size_t write_cb(char *ptr, size_t size, size_t nmemb, void *userdata) {
static_cast<std::string *>(userdata)->append(ptr, size * nmemb);
return size * nmemb;
}
int main() {
// Постійний JWT з Settings → Automation API.
const std::string token = "YOUR_SECRET_TOKEN";
curl_global_init(CURL_GLOBAL_DEFAULT);
CURL *curl = curl_easy_init();
if (!curl) {
std::cerr << "curl_easy_init failed\n";
curl_global_cleanup();
return 1;
}
struct curl_slist *headers = nullptr;
headers = curl_slist_append(headers, ("Authorization: Bearer " + token).c_str());
headers = curl_slist_append(headers, "Content-Type: application/json");
const std::string body = R"json({
"name": "text"
})json";
std::string response;
curl_easy_setopt(curl, CURLOPT_URL, "http://127.0.0.1:40325/folders/text");
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, body.c_str());
curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, static_cast<long>(body.size()));
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_cb);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);
const CURLcode rc = curl_easy_perform(curl);
if (rc != CURLE_OK) {
std::cerr << curl_easy_strerror(rc) << "\n";
} else {
long status = 0;
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &status);
std::cout << status << "\n" << response << "\n";
}
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
curl_global_cleanup();
return rc == CURLE_OK ? 0 : 1;
}{
"renamed_to": "text",
"profiles": 1
}Видалити папку
http://127.0.0.1:40325/folders/{folder}Видаляє тег папки. При delete_profiles=true профілі всередині теж
видаляються; інакше вони переходять до «Усі» (тег знімається).
Постійний JWT з Settings → Automation API.
Видалити профілі з папки (за замовчуванням false = зняти тег).
200Видалено.application/json
Кількість задіяних профілів.
401Відсутній або недійсний Bearer-токен.
/folders/textDELETE /folders/text HTTP/1.1
Host: 127.0.0.1:40325
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*curl -X DELETE 'http://127.0.0.1:40325/folders/text' \
-H 'Authorization: Bearer YOUR_SECRET_TOKEN'import requests
# Постійний JWT з Settings → Automation API.
token = "YOUR_SECRET_TOKEN"
url = "http://127.0.0.1:40325/folders/text"
headers = {
"Authorization": f"Bearer {token}",
}
response = requests.delete(url, headers=headers, timeout=30)
response.raise_for_status()
print(response.status_code)
print(response.text)// Постійний JWT з Settings → Automation API.
const token = "YOUR_SECRET_TOKEN";
const url = "http://127.0.0.1:40325/folders/text";
const response = await fetch(url, {
method: "DELETE",
headers: {
"Authorization": `Bearer ${token}`,
},
});
console.log(response.status);
console.log(await response.text());package main
import (
"fmt"
"io"
"log"
"net/http"
)
func main() {
// Постійний JWT з Settings → Automation API.
token := "YOUR_SECRET_TOKEN"
url := "http://127.0.0.1:40325/folders/text"
req, err := http.NewRequest("DELETE", url, nil)
if err != nil {
log.Fatal(err)
}
req.Header.Set("Authorization", "Bearer "+token)
resp, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
out, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal(err)
}
fmt.Println(resp.Status)
fmt.Println(string(out))
}// Cargo.toml: reqwest = { version = "0.12", features = ["json"] }, tokio = { version = "1", features = ["full"] }
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Постійний JWT з Settings → Automation API.
let token = "YOUR_SECRET_TOKEN";
let client = reqwest::Client::new();
let response = client
.delete("http://127.0.0.1:40325/folders/text")
.header("Authorization", format!("Bearer {token}"))
.send()
.await?;
println!("{}", response.status());
println!("{}", response.text().await?);
Ok(())
}using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
class Program
{
static async Task Main()
{
// Постійний JWT з Settings → Automation API.
var token = "YOUR_SECRET_TOKEN";
using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
var request = new HttpRequestMessage(HttpMethod.Delete, "http://127.0.0.1:40325/folders/text");
var response = await client.SendAsync(request);
Console.WriteLine((int)response.StatusCode);
Console.WriteLine(await response.Content.ReadAsStringAsync());
}
}// build: c++ -std=c++17 main.cpp -lcurl
#include <curl/curl.h>
#include <iostream>
#include <string>
static size_t write_cb(char *ptr, size_t size, size_t nmemb, void *userdata) {
static_cast<std::string *>(userdata)->append(ptr, size * nmemb);
return size * nmemb;
}
int main() {
// Постійний JWT з Settings → Automation API.
const std::string token = "YOUR_SECRET_TOKEN";
curl_global_init(CURL_GLOBAL_DEFAULT);
CURL *curl = curl_easy_init();
if (!curl) {
std::cerr << "curl_easy_init failed\n";
curl_global_cleanup();
return 1;
}
struct curl_slist *headers = nullptr;
headers = curl_slist_append(headers, ("Authorization: Bearer " + token).c_str());
std::string response;
curl_easy_setopt(curl, CURLOPT_URL, "http://127.0.0.1:40325/folders/text");
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_cb);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);
const CURLcode rc = curl_easy_perform(curl);
if (rc != CURLE_OK) {
std::cerr << curl_easy_strerror(rc) << "\n";
} else {
long status = 0;
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &status);
std::cout << status << "\n" << response << "\n";
}
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
curl_global_cleanup();
return rc == CURLE_OK ? 0 : 1;
}{
"deleted_folder": "text",
"delete_profiles": true,
"profiles": 1
}Створити профіль у папці
http://127.0.0.1:40325/folders/{folder}/profilesТе саме, що POST /profiles, але папка береться з шляху
(переоприділяє folder у тілі запиту).
Постійний JWT з Settings → Automation API.
Прив'язати проксі зі сховища (за id).
Прив'язати проксі рядком (host:port:user:pass або
scheme://user:pass@host:port). Для постійного профілю проксі
додається у сховище (дедуплікація за ендпоінтом) та проходить
повний тест (UDP + гео), потім прив'язується за id; відображається
у списку проксі, результат QUIC/WebRTC кешується. Для тимчасового
профілю проксі прикріплюється інлайн (не зберігається). Ігнорується,
якщо задано proxy_id.
Тег папки (ігнорується для /folders/{folder}/profiles; там пріоритет у шляху).
Акцентний колір піктограми вікна профілю та мітки з його назвою в адресному рядку. Якщо поле не вказано, колір піктограми визначається за назвою, а мітка зберігає колір панелі інструментів браузера.
Ідентифікатори бібліотеки розширень (GET /extensions), завантажуються під час запуску. Бібліотека не має ідентифікатора 400, а не профілю, який автоматично запускається без нього.
Заявлена частота оновлення екрана, записана в screen.refresh_rate. Жоден веб-API не повідомляє це значення; сторінка оцінює його за часом виконання requestAnimationFrame. Якщо поле не вказано, використовується 60, а не частота екрана хоста. Кадри можна лише сповільнювати, тому фактична частота є найближчим цілим дільником частоти панелі хоста, що не перевищує вказане значення.
fingerprintobject · FingerprintrequiredЗберігається дослівно. Отримайте з /fingerprint/new та за потреби відредагуйте.
Show propertiesHide properties
Зберігається дослівно. Отримайте з /fingerprint/new та за потреби відредагуйте.
0 = режим лише перевизначень (типовий випадок).
navigatorobjectoptionalShow propertiesHide properties
81632screenobjectoptionalShow propertiesHide properties
srgbp3rec2020Заявлена частота оновлення екрана. Якщо поле не вказано, використовується 60. Див. поле refresh_rate у запитах створення та редагування.
client_hintsobjectoptionalСімейство Sec-CH-UA (у browser.vision називається hints).
Show propertiesHide properties
Сімейство Sec-CH-UA (у browser.vision називається hints).
webglobjectoptionalShow propertiesHide properties
Режим обробки WebRTC.
autotcp_onlyblocknoiseobject · NoisePrefsoptionalНалаштування антифінгерпринт-шуму за векторами. Кожен блок: {enabled, seed}
(+ специфічні параметри). enabled:false = наскрізна передача.
Show propertiesHide properties
Налаштування антифінгерпринт-шуму за векторами. Кожен блок: {enabled, seed}
(+ специфічні параметри). enabled:false = наскрізна передача.
canvasobject · NoiseBlockoptionalShow propertiesHide properties
Ентропія на профіль; 0 = обчислити автоматично.
webglobject · NoiseBlockoptionalShow propertiesHide properties
Ентропія на профіль; 0 = обчислити автоматично.
audioobject · NoiseBlockoptionalShow propertiesHide properties
Ентропія на профіль; 0 = обчислити автоматично.
client_rectsobject · NoiseBlockoptionalShow propertiesHide properties
Ентропія на профіль; 0 = обчислити автоматично.
sensorsobject · NoiseBlockoptionalShow propertiesHide properties
Ентропія на профіль; 0 = обчислити автоматично.
fontsobject · NoiseBlockoptionalenabled:true приховує невелике детерміноване підмножество
несуттєвих шрифтів для кожного профілю (решта реальних шрифтів
хоста проходять наскрізь).
Show propertiesHide properties
enabled:true приховує невелике детерміноване підмножество
несуттєвих шрифтів для кожного профілю (решта реальних шрифтів
хоста проходять наскрізь).
Ентропія на профіль; 0 = обчислити автоматично.
networkobjectoptionalShow propertiesHide properties
Захист від сканування портів локальної мережі (ports_protection).
Ім'я за IANA або "auto"; буде визначено через прив'язаний проксі при запуску.
200Метадані створеного профілю.application/json
Метадані профілю в лаунчері (повертаються при створенні).
ISO-8601 або null.
Акцентний колір значка у форматі #rrggbb; null означає, що колір визначається за назвою, як у браузері, коли колір не вибрано.
Ідентифікатори бібліотеки розширень завантажуються під час запуску.
400Відсутній або не є об'єктом `fingerprint`, або нерозбірлива строка проксі.application/json
401Відсутній або недійсний Bearer-токен.
/folders/text/profilesPOST /folders/text/profiles HTTP/1.1
Host: 127.0.0.1:40325
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
{
"name": "text",
"notes": "text",
"proxy_id": "text",
"proxy": "socks5://user:[email protected]:1080",
"folder": "text",
"color": "#2FCB80",
"extensions": [
"text"
],
"refresh_rate": 60,
"fingerprint": {
"name": "text",
"notes": "text",
"seed": 1,
"navigator": {
"user_agent": "text",
"platform": "Win32",
"hardware_concurrency": 12,
"device_memory": 16,
"language": "text",
"do_not_track": true
},
"screen": {
"width": 1,
"height": 1,
"avail_width": 1,
"avail_height": 1,
"color_depth": 24,
"device_pixel_ratio": 2,
"color_gamut": "",
"refresh_rate": 60
},
"client_hints": {
"platform": "text",
"platform_version": "text",
"architecture": "x86",
"bitness": "64",
"mobile": true
},
"webgl": {
"unmasked_vendor": "text",
"unmasked_renderer": "text"
},
"webgpu": {},
"webrtc": "auto",
"noise": {
"canvas": {
"enabled": true,
"seed": 1
},
"webgl": {
"enabled": true,
"seed": 1,
"intensity": 1
},
"audio": {
"enabled": true,
"seed": 1,
"intensity": 1
},
"client_rects": {
"enabled": true,
"seed": 1,
"max_offset": 1
},
"sensors": {
"enabled": true,
"seed": 1
},
"fonts": {
"enabled": true,
"seed": 1
}
},
"network": {
"blocked_ports": [
1
]
},
"timezone": "text"
}
}curl -X POST 'http://127.0.0.1:40325/folders/text/profiles' \
-H 'Authorization: Bearer YOUR_SECRET_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"name":"text","notes":"text","proxy_id":"text","proxy":"socks5://user:[email protected]:1080","folder":"text","color":"#2FCB80","extensions":["text"],"refresh_rate":60,"fingerprint":{"name":"text","notes":"text","seed":1,"navigator":{"user_agent":"text","platform":"Win32","hardware_concurrency":12,"device_memory":16,"language":"text","do_not_track":true},"screen":{"width":1,"height":1,"avail_width":1,"avail_height":1,"color_depth":24,"device_pixel_ratio":2,"color_gamut":"","refresh_rate":60},"client_hints":{"platform":"text","platform_version":"text","architecture":"x86","bitness":"64","mobile":true},"webgl":{"unmasked_vendor":"text","unmasked_renderer":"text"},"webgpu":{},"webrtc":"auto","noise":{"canvas":{"enabled":true,"seed":1},"webgl":{"enabled":true,"seed":1,"intensity":1},"audio":{"enabled":true,"seed":1,"intensity":1},"client_rects":{"enabled":true,"seed":1,"max_offset":1},"sensors":{"enabled":true,"seed":1},"fonts":{"enabled":true,"seed":1}},"network":{"blocked_ports":[1]},"timezone":"text"}}'import requests
# Постійний JWT з Settings → Automation API.
token = "YOUR_SECRET_TOKEN"
url = "http://127.0.0.1:40325/folders/text/profiles"
headers = {
"Authorization": f"Bearer {token}",
}
payload = {
"name": "text",
"notes": "text",
"proxy_id": "text",
"proxy": "socks5://user:[email protected]:1080",
"folder": "text",
"color": "#2FCB80",
"extensions": [
"text",
],
"refresh_rate": 60,
"fingerprint": {
"name": "text",
"notes": "text",
"seed": 1,
"navigator": {
"user_agent": "text",
"platform": "Win32",
"hardware_concurrency": 12,
"device_memory": 16,
"language": "text",
"do_not_track": True,
},
"screen": {
"width": 1,
"height": 1,
"avail_width": 1,
"avail_height": 1,
"color_depth": 24,
"device_pixel_ratio": 2,
"color_gamut": "",
"refresh_rate": 60,
},
"client_hints": {
"platform": "text",
"platform_version": "text",
"architecture": "x86",
"bitness": "64",
"mobile": True,
},
"webgl": {
"unmasked_vendor": "text",
"unmasked_renderer": "text",
},
"webgpu": {},
"webrtc": "auto",
"noise": {
"canvas": {
"enabled": True,
"seed": 1,
},
"webgl": {
"enabled": True,
"seed": 1,
"intensity": 1,
},
"audio": {
"enabled": True,
"seed": 1,
"intensity": 1,
},
"client_rects": {
"enabled": True,
"seed": 1,
"max_offset": 1,
},
"sensors": {
"enabled": True,
"seed": 1,
},
"fonts": {
"enabled": True,
"seed": 1,
},
},
"network": {
"blocked_ports": [
1,
],
},
"timezone": "text",
},
}
response = requests.post(url, headers=headers, json=payload, timeout=30)
response.raise_for_status()
print(response.status_code)
print(response.text)// Постійний JWT з Settings → Automation API.
const token = "YOUR_SECRET_TOKEN";
const url = "http://127.0.0.1:40325/folders/text/profiles";
const payload = {
"name": "text",
"notes": "text",
"proxy_id": "text",
"proxy": "socks5://user:[email protected]:1080",
"folder": "text",
"color": "#2FCB80",
"extensions": [
"text"
],
"refresh_rate": 60,
"fingerprint": {
"name": "text",
"notes": "text",
"seed": 1,
"navigator": {
"user_agent": "text",
"platform": "Win32",
"hardware_concurrency": 12,
"device_memory": 16,
"language": "text",
"do_not_track": true
},
"screen": {
"width": 1,
"height": 1,
"avail_width": 1,
"avail_height": 1,
"color_depth": 24,
"device_pixel_ratio": 2,
"color_gamut": "",
"refresh_rate": 60
},
"client_hints": {
"platform": "text",
"platform_version": "text",
"architecture": "x86",
"bitness": "64",
"mobile": true
},
"webgl": {
"unmasked_vendor": "text",
"unmasked_renderer": "text"
},
"webgpu": {},
"webrtc": "auto",
"noise": {
"canvas": {
"enabled": true,
"seed": 1
},
"webgl": {
"enabled": true,
"seed": 1,
"intensity": 1
},
"audio": {
"enabled": true,
"seed": 1,
"intensity": 1
},
"client_rects": {
"enabled": true,
"seed": 1,
"max_offset": 1
},
"sensors": {
"enabled": true,
"seed": 1
},
"fonts": {
"enabled": true,
"seed": 1
}
},
"network": {
"blocked_ports": [
1
]
},
"timezone": "text"
}
};
const response = await fetch(url, {
method: "POST",
headers: {
"Authorization": `Bearer ${token}`,
"Content-Type": "application/json",
},
body: JSON.stringify(payload),
});
console.log(response.status);
console.log(await response.text());package main
import (
"bytes"
"fmt"
"io"
"log"
"net/http"
)
func main() {
// Постійний JWT з Settings → Automation API.
token := "YOUR_SECRET_TOKEN"
url := "http://127.0.0.1:40325/folders/text/profiles"
body := bytes.NewBufferString(`{
"name": "text",
"notes": "text",
"proxy_id": "text",
"proxy": "socks5://user:[email protected]:1080",
"folder": "text",
"color": "#2FCB80",
"extensions": [
"text"
],
"refresh_rate": 60,
"fingerprint": {
"name": "text",
"notes": "text",
"seed": 1,
"navigator": {
"user_agent": "text",
"platform": "Win32",
"hardware_concurrency": 12,
"device_memory": 16,
"language": "text",
"do_not_track": true
},
"screen": {
"width": 1,
"height": 1,
"avail_width": 1,
"avail_height": 1,
"color_depth": 24,
"device_pixel_ratio": 2,
"color_gamut": "",
"refresh_rate": 60
},
"client_hints": {
"platform": "text",
"platform_version": "text",
"architecture": "x86",
"bitness": "64",
"mobile": true
},
"webgl": {
"unmasked_vendor": "text",
"unmasked_renderer": "text"
},
"webgpu": {},
"webrtc": "auto",
"noise": {
"canvas": {
"enabled": true,
"seed": 1
},
"webgl": {
"enabled": true,
"seed": 1,
"intensity": 1
},
"audio": {
"enabled": true,
"seed": 1,
"intensity": 1
},
"client_rects": {
"enabled": true,
"seed": 1,
"max_offset": 1
},
"sensors": {
"enabled": true,
"seed": 1
},
"fonts": {
"enabled": true,
"seed": 1
}
},
"network": {
"blocked_ports": [
1
]
},
"timezone": "text"
}
}`)
req, err := http.NewRequest("POST", url, body)
if err != nil {
log.Fatal(err)
}
req.Header.Set("Authorization", "Bearer "+token)
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
out, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal(err)
}
fmt.Println(resp.Status)
fmt.Println(string(out))
}// Cargo.toml: reqwest = { version = "0.12", features = ["json"] }, tokio = { version = "1", features = ["full"] }, serde_json = "1"
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Постійний JWT з Settings → Automation API.
let token = "YOUR_SECRET_TOKEN";
let client = reqwest::Client::new();
let response = client
.post("http://127.0.0.1:40325/folders/text/profiles")
.header("Authorization", format!("Bearer {token}"))
.json(&serde_json::json!({
"name": "text",
"notes": "text",
"proxy_id": "text",
"proxy": "socks5://user:[email protected]:1080",
"folder": "text",
"color": "#2FCB80",
"extensions": [
"text"
],
"refresh_rate": 60,
"fingerprint": {
"name": "text",
"notes": "text",
"seed": 1,
"navigator": {
"user_agent": "text",
"platform": "Win32",
"hardware_concurrency": 12,
"device_memory": 16,
"language": "text",
"do_not_track": true
},
"screen": {
"width": 1,
"height": 1,
"avail_width": 1,
"avail_height": 1,
"color_depth": 24,
"device_pixel_ratio": 2,
"color_gamut": "",
"refresh_rate": 60
},
"client_hints": {
"platform": "text",
"platform_version": "text",
"architecture": "x86",
"bitness": "64",
"mobile": true
},
"webgl": {
"unmasked_vendor": "text",
"unmasked_renderer": "text"
},
"webgpu": {},
"webrtc": "auto",
"noise": {
"canvas": {
"enabled": true,
"seed": 1
},
"webgl": {
"enabled": true,
"seed": 1,
"intensity": 1
},
"audio": {
"enabled": true,
"seed": 1,
"intensity": 1
},
"client_rects": {
"enabled": true,
"seed": 1,
"max_offset": 1
},
"sensors": {
"enabled": true,
"seed": 1
},
"fonts": {
"enabled": true,
"seed": 1
}
},
"network": {
"blocked_ports": [
1
]
},
"timezone": "text"
}
}))
.send()
.await?;
println!("{}", response.status());
println!("{}", response.text().await?);
Ok(())
}using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
class Program
{
static async Task Main()
{
// Постійний JWT з Settings → Automation API.
var token = "YOUR_SECRET_TOKEN";
using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
var request = new HttpRequestMessage(HttpMethod.Post, "http://127.0.0.1:40325/folders/text/profiles");
request.Content = new StringContent("""
{
"name": "text",
"notes": "text",
"proxy_id": "text",
"proxy": "socks5://user:[email protected]:1080",
"folder": "text",
"color": "#2FCB80",
"extensions": [
"text"
],
"refresh_rate": 60,
"fingerprint": {
"name": "text",
"notes": "text",
"seed": 1,
"navigator": {
"user_agent": "text",
"platform": "Win32",
"hardware_concurrency": 12,
"device_memory": 16,
"language": "text",
"do_not_track": true
},
"screen": {
"width": 1,
"height": 1,
"avail_width": 1,
"avail_height": 1,
"color_depth": 24,
"device_pixel_ratio": 2,
"color_gamut": "",
"refresh_rate": 60
},
"client_hints": {
"platform": "text",
"platform_version": "text",
"architecture": "x86",
"bitness": "64",
"mobile": true
},
"webgl": {
"unmasked_vendor": "text",
"unmasked_renderer": "text"
},
"webgpu": {},
"webrtc": "auto",
"noise": {
"canvas": {
"enabled": true,
"seed": 1
},
"webgl": {
"enabled": true,
"seed": 1,
"intensity": 1
},
"audio": {
"enabled": true,
"seed": 1,
"intensity": 1
},
"client_rects": {
"enabled": true,
"seed": 1,
"max_offset": 1
},
"sensors": {
"enabled": true,
"seed": 1
},
"fonts": {
"enabled": true,
"seed": 1
}
},
"network": {
"blocked_ports": [
1
]
},
"timezone": "text"
}
}
""", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine((int)response.StatusCode);
Console.WriteLine(await response.Content.ReadAsStringAsync());
}
}// build: c++ -std=c++17 main.cpp -lcurl
#include <curl/curl.h>
#include <iostream>
#include <string>
static size_t write_cb(char *ptr, size_t size, size_t nmemb, void *userdata) {
static_cast<std::string *>(userdata)->append(ptr, size * nmemb);
return size * nmemb;
}
int main() {
// Постійний JWT з Settings → Automation API.
const std::string token = "YOUR_SECRET_TOKEN";
curl_global_init(CURL_GLOBAL_DEFAULT);
CURL *curl = curl_easy_init();
if (!curl) {
std::cerr << "curl_easy_init failed\n";
curl_global_cleanup();
return 1;
}
struct curl_slist *headers = nullptr;
headers = curl_slist_append(headers, ("Authorization: Bearer " + token).c_str());
headers = curl_slist_append(headers, "Content-Type: application/json");
const std::string body = R"json({
"name": "text",
"notes": "text",
"proxy_id": "text",
"proxy": "socks5://user:[email protected]:1080",
"folder": "text",
"color": "#2FCB80",
"extensions": [
"text"
],
"refresh_rate": 60,
"fingerprint": {
"name": "text",
"notes": "text",
"seed": 1,
"navigator": {
"user_agent": "text",
"platform": "Win32",
"hardware_concurrency": 12,
"device_memory": 16,
"language": "text",
"do_not_track": true
},
"screen": {
"width": 1,
"height": 1,
"avail_width": 1,
"avail_height": 1,
"color_depth": 24,
"device_pixel_ratio": 2,
"color_gamut": "",
"refresh_rate": 60
},
"client_hints": {
"platform": "text",
"platform_version": "text",
"architecture": "x86",
"bitness": "64",
"mobile": true
},
"webgl": {
"unmasked_vendor": "text",
"unmasked_renderer": "text"
},
"webgpu": {},
"webrtc": "auto",
"noise": {
"canvas": {
"enabled": true,
"seed": 1
},
"webgl": {
"enabled": true,
"seed": 1,
"intensity": 1
},
"audio": {
"enabled": true,
"seed": 1,
"intensity": 1
},
"client_rects": {
"enabled": true,
"seed": 1,
"max_offset": 1
},
"sensors": {
"enabled": true,
"seed": 1
},
"fonts": {
"enabled": true,
"seed": 1
}
},
"network": {
"blocked_ports": [
1
]
},
"timezone": "text"
}
})json";
std::string response;
curl_easy_setopt(curl, CURLOPT_URL, "http://127.0.0.1:40325/folders/text/profiles");
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, body.c_str());
curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, static_cast<long>(body.size()));
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_cb);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);
const CURLcode rc = curl_easy_perform(curl);
if (rc != CURLE_OK) {
std::cerr << curl_easy_strerror(rc) << "\n";
} else {
long status = 0;
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &status);
std::cout << status << "\n" << response << "\n";
}
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
curl_global_cleanup();
return rc == CURLE_OK ? 0 : 1;
}{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"notes": "text",
"proxy_id": "text",
"last_launched_at": "text",
"created_at": "text",
"pinned": true,
"folder": "text",
"color": "text",
"extensions": [
"text"
]
}{
"error": "text"
}Оновлено