> For the complete documentation index, see [llms.txt](https://docs.tumbler.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tumbler.app/ru/kontrakt-podpiski/examples.md).

# Примеры подписки

## Для кого

Разработчики провайдера, которым нужны короткие рабочие примеры: что отдавать по subscription URL и какую ссылку показывать пользователю.

## Что можно сделать

* Проверить raw VLESS ответ.
* Проверить JSON `links/meta` ответ.
* Сформировать `tumbler://add?link=...` для raw HTTPS и `crypt3`.

## Примеры

* `text/plain` с VLESS ссылками.
* JSON объект с `links` и `meta`.
* Add link для пользователя.

## См. также

* [getting-started/add-link.md](/ru/nachat/add-link.md)
* [subscription/response-formats.md](/ru/kontrakt-podpiski/response-formats.md)
* [operations/caching-and-304.md](/ru/uluchsheniya-posle-pervogo-zapuska/caching-and-304.md)
* [subscription/metadata.md](/ru/kontrakt-podpiski/metadata.md)

## Минимальный raw VLESS ответ

Если ваш endpoint уже отдаёт строки `vless://...`, можно начать с этого:

```http
HTTP/1.1 200 OK
Content-Type: text/plain; charset=utf-8
Cache-Control: public, max-age=300
ETag: "sub-u-123-v1"

vless://11111111-1111-1111-1111-111111111111@edge.example.com:443?security=reality&pbk=pk1&sid=s1&sni=edge.example.com#Edge-1
vless://22222222-2222-2222-2222-222222222222@backup.example.com:443?type=grpc#Backup
```

Tumbler backend возьмёт каждую валидную VLESS строку, извлечёт host, port, UUID, transport/security параметры и имя после `#`.

## Raw VLESS с метаданными

Метаданные можно передавать строками `#key: value` перед ссылками:

```
#profile-title: Provider Premium
#support-url: https://help.provider.example.com
#manage-url: https://account.provider.example.com
#subscription-userinfo: upload=123456; download=654321; total=10737418240; expire=1800000000
#balancer-method: ping
vless://11111111-1111-1111-1111-111111111111@edge.example.com:443?security=reality&pbk=pk1&sid=s1&sni=edge.example.com#Edge-1
vless://22222222-2222-2222-2222-222222222222@backup.example.com:443?type=grpc#Backup
```

## JSON `links/meta`

Если вам удобнее JSON, отдавайте массив ссылок в `links` или `nodes`, а настройки в `meta`:

```json
{
  "links": [
    "vless://11111111-1111-1111-1111-111111111111@edge.example.com:443?security=reality&pbk=pk1&sid=s1&sni=edge.example.com#Edge-1",
    "vless://22222222-2222-2222-2222-222222222222@backup.example.com:443?type=grpc#Backup"
  ],
  "meta": {
    "profile-title": "Provider Premium",
    "support-url": "https://help.provider.example.com",
    "manage-url": "https://account.provider.example.com",
    "subscription-userinfo": "upload=123456; download=654321; total=10737418240; expire=1800000000",
    "balancer-method": "ping"
  }
}
```

## Add link для raw HTTPS URL

Source:

```
https://provider.example.com/sub/u_123
```

Add link:

```
tumbler://add?link=https%3A%2F%2Fprovider.example.com%2Fsub%2Fu_123
```

## Add link для crypt3

Source после шифрования:

```
schema://crypt3/<token>
```

Add link:

```
tumbler://add?link=schema%3A%2F%2Fcrypt3%2F<token>
```

## Заголовки для кэширования

```http
HTTP/1.1 200 OK
Content-Type: text/plain; charset=utf-8
Cache-Control: public, max-age=300
ETag: "sub-u-123-v1"
Last-Modified: Wed, 01 Jul 2026 09:00:00 GMT
```

При совпадении `If-None-Match` можно вернуть `304 Not Modified` без тела. Подробности - в [caching-and-304.md](/ru/uluchsheniya-posle-pervogo-zapuska/caching-and-304.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.tumbler.app/ru/kontrakt-podpiski/examples.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
