Proxies
Список збережених проксі
GET
http://127.0.0.1:40325/proxiesПроксі, збережені у сховищі лаунчера. Облікові дані (логін/пароль) не повертаються.
Authorizations
bearerAuth
Authorizationstringrequired
Постійний JWT з Settings → Automation API.
Responses
200Коротка інформація про проксі.application/json
Збережений проксі без облікових даних.
idstringoptional
namestringoptional
kindstring · enumoptional
Possible values:
socks5httphttpshoststringoptional
portintegeroptional
countrystringoptional
Інформаційний тег (наприклад, "US").
401Відсутній або недійсний Bearer-токен.
GET
/proxiesGET /proxies HTTP/1.1
Host: 127.0.0.1:40325
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*curl -X GET 'http://127.0.0.1:40325/proxies' \
-H 'Authorization: Bearer YOUR_SECRET_TOKEN'import requests
# Постійний JWT з Settings → Automation API.
token = "YOUR_SECRET_TOKEN"
url = "http://127.0.0.1:40325/proxies"
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/proxies";
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/proxies"
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/proxies")
.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/proxies");
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/proxies");
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;
}200Коротка інформація про проксі.
[
{
"id": "text",
"name": "text",
"kind": "socks5",
"host": "text",
"port": 1,
"country": "text"
}
]Додати проксі
POST
http://127.0.0.1:40325/proxiesДодає проксі у сховище (з дедуплікацією за ендпоінтом). Передайте
рядок proxy або явні поля host/port (+ kind/username/password).
Authorizations
bearerAuth
Authorizationstringrequired
Постійний JWT з Settings → Automation API.
Body
application/json
proxystringoptional
scheme://user:pass@host:port або host:port:user:pass.
kindstring · enumoptional
Possible values:
socks5httphttpshoststringoptional
portintegeroptional
usernamestringoptional
passwordstringoptional
namestringoptional
countrystringoptional
notesstringoptional
Responses
200Коротка інформація про збережений проксі.application/json
Збережений проксі без облікових даних.
idstringoptional
namestringoptional
kindstring · enumoptional
Possible values:
socks5httphttpshoststringoptional
portintegeroptional
countrystringoptional
Інформаційний тег (наприклад, "US").
400Нерозбірливий проксі / не вказані host та port.application/json
errorstringrequired
401Відсутній або недійсний Bearer-токен.
POST
/proxiesPOST /proxies HTTP/1.1
Host: 127.0.0.1:40325
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
{
"proxy": "text",
"kind": "socks5",
"host": "text",
"port": 1,
"username": "text",
"password": "text",
"name": "text",
"country": "text",
"notes": "text"
}curl -X POST 'http://127.0.0.1:40325/proxies' \
-H 'Authorization: Bearer YOUR_SECRET_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"proxy":"text","kind":"socks5","host":"text","port":1,"username":"text","password":"text","name":"text","country":"text","notes":"text"}'import requests
# Постійний JWT з Settings → Automation API.
token = "YOUR_SECRET_TOKEN"
url = "http://127.0.0.1:40325/proxies"
headers = {
"Authorization": f"Bearer {token}",
}
payload = {
"proxy": "text",
"kind": "socks5",
"host": "text",
"port": 1,
"username": "text",
"password": "text",
"name": "text",
"country": "text",
"notes": "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/proxies";
const payload = {
"proxy": "text",
"kind": "socks5",
"host": "text",
"port": 1,
"username": "text",
"password": "text",
"name": "text",
"country": "text",
"notes": "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/proxies"
body := bytes.NewBufferString(`{
"proxy": "text",
"kind": "socks5",
"host": "text",
"port": 1,
"username": "text",
"password": "text",
"name": "text",
"country": "text",
"notes": "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/proxies")
.header("Authorization", format!("Bearer {token}"))
.json(&serde_json::json!({
"proxy": "text",
"kind": "socks5",
"host": "text",
"port": 1,
"username": "text",
"password": "text",
"name": "text",
"country": "text",
"notes": "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/proxies");
request.Content = new StringContent("""
{
"proxy": "text",
"kind": "socks5",
"host": "text",
"port": 1,
"username": "text",
"password": "text",
"name": "text",
"country": "text",
"notes": "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({
"proxy": "text",
"kind": "socks5",
"host": "text",
"port": 1,
"username": "text",
"password": "text",
"name": "text",
"country": "text",
"notes": "text"
})json";
std::string response;
curl_easy_setopt(curl, CURLOPT_URL, "http://127.0.0.1:40325/proxies");
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": "text",
"name": "text",
"kind": "socks5",
"host": "text",
"port": 1,
"country": "text"
}{
"error": "text"
}Видалити проксі
DEL
http://127.0.0.1:40325/proxies/{id}Authorizations
bearerAuth
Authorizationstringrequired
Постійний JWT з Settings → Automation API.
Path parameters
idstringrequired
Responses
200Видалено.application/json
deletedbooleanoptional
idstringoptional
401Відсутній або недійсний Bearer-токен.
DEL
/proxies/textDELETE /proxies/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/proxies/text' \
-H 'Authorization: Bearer YOUR_SECRET_TOKEN'import requests
# Постійний JWT з Settings → Automation API.
token = "YOUR_SECRET_TOKEN"
url = "http://127.0.0.1:40325/proxies/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/proxies/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/proxies/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/proxies/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/proxies/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/proxies/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;
}200Видалено.
{
"deleted": true,
"id": "text"
}Оновлено