Skip to content

Commit 8cb1ada

Browse files
authored
Add baseline support for config subscriptions (#3)
1 parent ebf4b91 commit 8cb1ada

38 files changed

Lines changed: 3024 additions & 36 deletions

‎README.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ For an existing inventory, pass `--inventory PATH` before the command. Generate
4141
./mega-proxy summary
4242
```
4343

44+
Optional personalized configuration feeds can run on separate HTTPS hosts using the same
45+
inventory and user credentials. See [config API setup](docs/ru/config-api.md) and the
46+
[inventory example](inventory.config-api.example.yml).
47+
4448
Inventory and generated exports contain secrets. Keep them private and do not commit them.
4549

4650
## Connect with Android MegaProxy

‎docs/en/README.md‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,13 @@ Use dedicated SSH proxy logins, separate from the administrator. SSH key exports
134134
`generated_private_key` on the control machine and embed its contents; a public key alone is not
135135
enough to generate a client configuration. Android MegaProxy requires an unencrypted private key.
136136

137+
To link SSH accounts explicitly, set `ssh_users: [tun-alice]` on an HTTPS user or run
138+
`./mega-proxy link-users` to choose existing accounts. The wizard offers this selection when
139+
creating users of both types. An empty or omitted `ssh_users` means no links; names are never
140+
matched automatically. Unknown accounts and duplicates fail inventory validation. An SSH account
141+
may be linked to multiple HTTPS users; removing an SSH account also removes its links. These links
142+
provide metadata for personalized delivery; the current `export` and `configs` commands still export all users.
143+
137144
For country flags, start host identifiers with a two-letter country code followed by `_`, such as
138145
`de_entry` and `us_exit`. Explicit HTTPS chain pairs supply the exit country in `country_code`.
139146
The code is a display hint; use the client connection test to check the observed exit country.
@@ -187,6 +194,12 @@ servers. Exports contain plaintext passwords and private keys; handle them as se
187194

188195
## Android MegaProxy
189196

197+
Optional `services.config_api` deploys personalized HTTPS configuration feeds to separate,
198+
equal peers. See the [inventory example](../../inventory.config-api.example.yml) and
199+
[configuration API guide (Russian)](../ru/config-api.md). Feeds use canonical v8, scrypt access
200+
verification, password-encrypted SSH secrets, client projections, bootstrap subscriptions and
201+
authenticated ETags. `/robots.txt` is public; other paths and invalid credentials return 403.
202+
190203
Compatibility was reviewed on 2026-09-08 against AndroidMegaProxy
191204
[revision c8190e9](https://github.com/andre487/AndroidMegaProxy/tree/c8190e97b705a2c4578d278c40a690e97c5d5f27).
192205
The client [importer](https://github.com/andre487/AndroidMegaProxy/blob/c8190e97b705a2c4578d278c40a690e97c5d5f27/app/src/main/java/net/megaproxy487/data/ConfigTransfer.kt)

‎docs/ru/README.md‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,14 @@ Inventory, ключи и экспорты остаются на сервере;
140140
для генерации клиентского конфига недостаточно. Android MegaProxy требует приватный ключ без
141141
парольной защиты.
142142

143+
Для явной привязки SSH-аккаунтов укажите у HTTPS-пользователя `ssh_users: [tun-alice]`
144+
или выполните `./mega-proxy link-users` и выберите аккаунты из списка. Настройщик предлагает
145+
этот выбор при создании пользователей обоих типов. Пустой или отсутствующий `ssh_users`
146+
означает отсутствие привязки; имена автоматически не сопоставляются. Несуществующие аккаунты
147+
и повторы отклоняются при проверке inventory. Один SSH-аккаунт можно привязать к нескольким
148+
HTTPS-пользователям; удаление SSH-аккаунта также удаляет его привязки. Эти связи задают данные
149+
для персональной выдачи; текущие команды `export` и `configs` по-прежнему экспортируют всех пользователей.
150+
143151
Для флагов стран начинайте идентификаторы хостов с двухбуквенного кода страны и `_`, например
144152
`de_entry` и `us_exit`. В явных HTTPS-парах код страны выхода задаётся через `country_code`.
145153
Это подпись для отображения; фактическую страну выхода проверяйте тестом соединения в приложении.
@@ -194,6 +202,10 @@ SAN, расширяет сертификат и перезапускает GOST,
194202

195203
## Android MegaProxy
196204

205+
Персональную выдачу конфигов по HTTPS на отдельных равноправных машинах можно включить
206+
через `services.config_api`. См. [настройку API](config-api.md) и
207+
[пример inventory](../../inventory.config-api.example.yml).
208+
197209
Совместимость проверена 2026-09-08 по AndroidMegaProxy
198210
[ревизии c8190e9](https://github.com/andre487/AndroidMegaProxy/tree/c8190e97b705a2c4578d278c40a690e97c5d5f27).
199211
Клиентский [импортёр](https://github.com/andre487/AndroidMegaProxy/blob/c8190e97b705a2c4578d278c40a690e97c5d5f27/app/src/main/java/net/megaproxy487/data/ConfigTransfer.kt)

0 commit comments

Comments
 (0)