Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
grbovic authored Feb 18, 2025
1 parent f298a05 commit 71155cd
Showing 1 changed file with 0 additions and 88 deletions.
88 changes: 0 additions & 88 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,94 +31,6 @@ Once running, the proxy operates as a local `SOCKS5` server and can be configure

See [OpenAPI specification](https://github.com/censortracker/proxy/blob/main/proxyserver/openapi_en.yaml) for more details.

#### Retrieve Configs

**`GET /api/v1/configs`**

This endpoint retrieves a list of configs. You can request either all configs or specific ones by UUID.

##### Query Parameters

- `uuid` (optional): A comma-separated list of UUIDs.

##### Response

- If no `uuid` is provided – returns all configs.
- If `uuid`s are provided – returns only the specified configs.
- If no matching configs are found – returns an empty list.

#### Add Configs

**`POST /api/v1/configs`**

This endpoint adds one or more new configs. Each config is assigned a unique UUID.

##### Request Body

An array of serialized config strings, for example: `["vless://…", "vmess://…", "trojan://…"]`

##### Response

- 200 OK if the configs are added successfully.
- 400 Bad Request if the data format is invalid.


#### Replace Entire Config List

**`PUT /api/v1/configs`**

This endpoint completely replaces the current list of configs with a new list. If the currently active config is missing from the new list, the first config in the list becomes active.

##### Request Body

A JSON array containing the full list of configs.

##### Response

- 200 OK if the list is updated successfully.
- 400 Bad Request if the data format is invalid.

#### Delete a Config

**`DELETE /api/v1/configs`**

This endpoint deletes a config by its UUID. If the active config is deleted, the first remaining config becomes active.

##### Query Parameters

- `uuid` (required): The UUID of the config to delete.

##### Response

- 204 No Content if the config is deleted successfully.
- 404 Not Found if the config is not found.

#### Activate a Config

**`PUT /api/v1/configs/activate`**

This endpoint sets the specified config as active by deserializing and preparing it for use.

##### Query Parameters

- `uuid` (required): The UUID of the config to activate.

##### Response

- 200 OK if the config is activated successfully.
- 404 Not Found if the config is not found.

#### Retrieve Active Config

**`GET /api/v1/configs/active`**

This endpoint returns the currently active config.

##### Response
- Returns the active config.
- 404 Not Found if there is no active config.


## Contributions

Contributions are welcome! Feel free to fork this repository, submit issues, and open pull requests.

0 comments on commit 71155cd

Please sign in to comment.