-
-
Notifications
You must be signed in to change notification settings - Fork 272
Улучшена "архитектура" документации и настроен triage для issues #801
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
deexsed
wants to merge
3
commits into
Flowseal:main
Choose a base branch
from
deexsed:ref/docs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # Default owners | ||
| * @Flowseal | ||
|
|
||
| # Automation and repository settings | ||
| .github/** @Flowseal | ||
|
|
||
| # Documentation | ||
| docs/** @Flowseal | ||
|
|
||
| # Core proxy implementation | ||
| proxy/** @Flowseal |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| blank_issues_enabled: false | ||
|
|
||
| contact_links: | ||
| - name: 📚 Документация | ||
| url: https://github.com/Flowseal/tg-ws-proxy/tree/main/docs | ||
| about: Ознакомьтесь с документацией перед созданием issue |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| name: 🚀 Предложение | ||
| title: '[Предложение] ' | ||
| description: Предложить улучшение или новую функциональность | ||
| labels: ['type: предложение', 'status: нуждается в сортировке'] | ||
|
|
||
| body: | ||
| - type: textarea | ||
| id: solution | ||
| attributes: | ||
| label: Предлагаемое решение | ||
| description: Опишите, как именно вы предлагаете улучшить проект | ||
| placeholder: | | ||
| Предлагаю добавить ... | ||
| Это позволит ... | ||
| validations: | ||
| required: true | ||
|
|
||
| - type: dropdown | ||
| id: platform | ||
| attributes: | ||
| label: Для какой платформы актуально? | ||
| description: Выберите платформу, если предложение связано с конкретной ОС | ||
| options: | ||
| - Все платформы | ||
| - Windows | ||
| - macOS | ||
| - Linux | ||
| - Другое | ||
| validations: | ||
| required: true | ||
|
|
||
| - type: textarea | ||
| id: context | ||
| attributes: | ||
| label: Дополнительный контекст | ||
| description: Добавьте примеры, ссылки, скриншоты или другие детали | ||
| placeholder: Любые дополнительные материалы по предложению |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # Labels Reference | ||
|
|
||
| Этот список фиксирует лейблы, которые используются в issue-шаблонах и workflow triage. | ||
|
|
||
| ## Тип issue | ||
|
|
||
| - `type: проблема` — баг-репорты. | ||
| - `type: предложение` — предложения по улучшениям. | ||
|
|
||
| ## Статус issue | ||
|
|
||
| - `status: нуждается в сортировке` — новый issue, ожидает первичного triage. | ||
| - `status: в работе` — issue взят в работу мейнтейнером. | ||
|
|
||
| ## Важно | ||
|
|
||
| - Используйте лейблы строго в таком написании. | ||
| - Не создавайте дубликаты с похожими названиями. | ||
| - Если нужно изменить словарь лейблов, сначала обновите этот файл и связанные workflow. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| name: Auto comment on new issues | ||
|
|
||
| on: | ||
| issues: | ||
| types: [opened] | ||
|
|
||
| permissions: | ||
| issues: write | ||
|
|
||
| jobs: | ||
| comment: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Comment on new issue | ||
| uses: peter-evans/create-or-update-comment@v5 | ||
| with: | ||
| issue-number: ${{ github.event.issue.number }} | ||
| body: | | ||
| Спасибо за issue и за помощь проекту ❤️ | ||
|
|
||
| Чтобы не терять ваше время, сначала проверьте две вещи: | ||
| - вы на последней версии: [Releases](https://github.com/${{ github.repository }}/releases) | ||
| - запускали по инструкции для своей ОС: [Быстрый старт](https://github.com/${{ github.repository }}/blob/main/docs/README.md#-быстрый-старт) | ||
|
|
||
| Если проблема осталась, пожалуйста, допишите в этот issue: | ||
| - версию `tg-ws-proxy`; | ||
| - вашу ОС и способ запуска (релизный бинарник / из исходников); | ||
| - короткое описание, как воспроизвести проблему (если возможно); | ||
| - лог/текст ошибки или скриншот. | ||
|
|
||
| Частый кейс: если не грузит медиа в Telegram, проверьте раздел в документации | ||
| «Не грузит фото/видео?» — [README](https://github.com/${{ github.repository }}/blob/main/docs/README.md#не-грузит-фотовидео). | ||
|
|
||
| После этого мы сможем быстрее воспроизвести проблему и дать точный ответ. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| # CONTRIBUTING | ||
|
|
||
| Спасибо за желание помочь проекту `tg-ws-proxy`. | ||
|
|
||
| ## Перед созданием issue | ||
|
|
||
| 1. Проверьте документацию в `docs/README.md`. | ||
| 2. Убедитесь, что похожий issue еще не открыт. | ||
| 3. Для корректной работы triage используйте стандартные лейблы из `.github/labels.md`. | ||
|
|
||
| ## Как сообщать о проблемах | ||
|
|
||
| - Используйте шаблон `Проблема`. | ||
| - По возможности укажите: | ||
| - версию приложения, | ||
| - ОС, | ||
| - шаги воспроизведения, | ||
| - ожидаемое и фактическое поведение, | ||
| - лог-файл или текст ошибки. | ||
|
|
||
| Чем точнее описание, тем быстрее можно помочь. | ||
|
|
||
| ## Локальный запуск из исходников | ||
|
|
||
| Требуется Python `>=3.8`. | ||
|
|
||
| ```bash | ||
| pip install -e . | ||
| ``` | ||
|
|
||
| Запуск: | ||
|
|
||
| - консольный режим: `tg-ws-proxy` | ||
| - Windows tray: `tg-ws-proxy-tray-win` | ||
| - macOS tray: `tg-ws-proxy-tray-macos` | ||
| - Linux tray: `tg-ws-proxy-tray-linux` | ||
|
|
||
| Подробности: `docs/BuildFromSource.md`. | ||
|
|
||
| ## Pull Request | ||
|
|
||
| Перед открытием PR: | ||
|
|
||
| 1. Убедитесь, что изменение решает конкретную проблему. | ||
| 2. Проверьте, что не сломаны существующие сценарии. | ||
| 3. Обновите документацию, если меняется поведение или настройка. | ||
|
|
||
| Небольшие и сфокусированные PR проверяются и принимаются быстрее. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| # Установка из исходников | ||
|
|
||
| ## Консольный прокси | ||
|
|
||
| Для запуска только прокси без интерфейса системного трея достаточно базовой установки: | ||
|
|
||
| ```bash | ||
| pip install -e . | ||
| tg-ws-proxy | ||
| ``` | ||
|
|
||
| ## Tray-приложение по ОС | ||
|
|
||
| ### Windows 7/10+ | ||
|
|
||
| ```bash | ||
| pip install -e . | ||
| tg-ws-proxy-tray-win | ||
| ``` | ||
|
|
||
| ### macOS | ||
|
|
||
| ```bash | ||
| pip install -e . | ||
| tg-ws-proxy-tray-macos | ||
| ``` | ||
|
|
||
| ### Linux | ||
|
|
||
| ```bash | ||
| pip install -e . | ||
| tg-ws-proxy-tray-linux | ||
| ``` | ||
|
|
||
| ## Консольный режим из исходников | ||
|
|
||
| ```bash | ||
| tg-ws-proxy [--port PORT] [--host HOST] [--dc-ip DC:IP ...] [-v] | ||
| ``` | ||
|
|
||
| **Аргументы:** | ||
|
|
||
| | Аргумент | По умолчанию | Описание | | ||
| |---|---|---| | ||
| | `--port` | `1443` | Порт прокси | | ||
| | `--host` | `127.0.0.1` | Хост прокси | | ||
| | `--secret` | `random` | 32-значный hex-ключ для авторизации клиентов | | ||
| | `--dc-ip` | `2:149.154.167.220`, `4:149.154.167.220` | Целевой IP для DC (параметр можно указывать несколько раз) | | ||
| | `--no-cfproxy` | `false` | Отключить попытку [проксирования через Cloudflare](./CfProxy.md) | | ||
| | `--cfproxy-domain` | | Указать свой домен для проксирования через Cloudflare. [Подробнее](./CfProxy.md) | | ||
| | `--cfproxy-priority` | `true` | Пробовать проксировать через Cloudflare перед прямым TCP подключением | | ||
| | `--fake-tls-domain` | | Включить маскировку Fake TLS (ee-secret) с указанным SNI-доменом | | ||
| | `--proxy-protocol` | выкл. | Принимать HAProxy PROXY protocol v1 (для работы за nginx/haproxy с `proxy_protocol on`) | | ||
| | `--buf-kb` | `256` | Размер буфера в КБ | | ||
| | `--pool-size` | `4` | Количество заготовленных соединений на каждый DC | | ||
| | `--log-file` | выкл. | Путь к файлу, в который будут сохраняться логи | | ||
| | `--log-max-mb` | `5` | Максимальный размер файла логов в МБ (после этого начинается перезапись) | | ||
| | `--log-backups` | `0` | Количество сохранений логов после перезаписи | | ||
| | `-v`, `--verbose` | выкл. | Подробное логирование (DEBUG) | | ||
|
|
||
| **Примеры:** | ||
|
|
||
| ```bash | ||
| # Стандартный запуск | ||
| tg-ws-proxy | ||
|
|
||
| # Другой порт и дополнительные DC | ||
| tg-ws-proxy --port 9050 --dc-ip 1:149.154.175.205 --dc-ip 2:149.154.167.220 | ||
|
|
||
| # С подробным логированием | ||
| tg-ws-proxy -v | ||
|
|
||
| # Fake TLS маскировка (ee-secret) | ||
| tg-ws-proxy --fake-tls-domain example.com | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,29 +1,32 @@ | ||
| # Cloudflare Proxy | ||
| # Cloudflare-прокси | ||
|
|
||
| Для недоступных датацентров можно использовать альтернативный бесплатный метод подключения - проксирование через Cloudflare. **Для работы нужен только домен**. В приложении есть домен по умолчанию, но его можно (и лучше) заменить на свой. | ||
| Для недоступных дата-центров можно использовать альтернативный бесплатный способ подключения — проксирование через Cloudflare. **Для работы нужен только домен**. В приложении есть домен по умолчанию, но его можно (и желательно) заменить на свой. | ||
|
|
||
| Прокси возвращает доступ к тому, что до этого не грузило (реакциям, некоторым стикерам). Если у вас до этого не грузило видео/фото на аккаунте без премиума, то уберите всё кроме `4:149.154.167.220` из `DC->IP` блока в настройках. Если CF-прокси у вас работает - медиа снова начнёт грузиться. | ||
| Прокси возвращает доступ к тому, что раньше не загружалось (реакции, некоторые стикеры). Если на аккаунте без Premium не загружаются фото/видео, оставьте в блоке `DC → IP` только `4:149.154.167.220`. Если CF-прокси работает, медиа снова начнет загружаться. | ||
|
|
||
| ## Зачем мне настраивать свой домен? | ||
| Cloudflare имеет лимиты на одновременное количество подключений WS. Домен по умолчанию может перестать работать в любой момент. | ||
|
|
||
| Cloudflare имеет лимиты на одновременное количество WS-подключений. Домен по умолчанию может перестать работать в любой момент. | ||
|
|
||
| ## Настройка своего домена | ||
| 1. Добавьте свой домен в Cloudflare (либо купив у них напрямую, либо поменяв NS сервера: https://developers.cloudflare.com/dns/zone-setups/full-setup/setup/). Домены стоят +- 150 рублей на год, подойдёт любой. | ||
|
|
||
| 2. В `SSL/TLS` -> `Overview` выставьте режим **Flexible** | ||
| 1. Добавьте свой домен в Cloudflare (либо купив его напрямую у Cloudflare, либо изменив NS-серверы: https://developers.cloudflare.com/dns/zone-setups/full-setup/setup/). Домены стоят примерно 150 рублей в год, подойдёт любой. | ||
|
|
||
| 2. В `SSL/TLS` → `Overview` выставьте режим **Flexible**. | ||
|
|
||
| 3. В `DNS` -> `Records` добавьте следующие `A` записи через `+ Add Record`: | ||
| 3. В `DNS` → `Records` добавьте следующие `A`-записи через `+ Add Record`: | ||
| - Name=`kws1` IPv4=`149.154.175.50` | ||
| - Name=`kws2` IPv4=`149.154.167.51` | ||
| - Name=`kws3` IPv4=`149.154.175.100` | ||
| - Name=`kws4` IPv4=`149.154.167.91` | ||
| - Name=`kws5` IPv4=`149.154.171.5` | ||
| - Name=`kws203` IPv4=`91.105.192.100` | ||
|
|
||
| 4. **Добавьте домен в [zapret](https://github.com/Flowseal/zapret-discord-youtube/) или в любое другое ПО, так как подсеть Cloudflare забанена (по крайней мере, если вы из России)** | ||
| 4. **Добавьте домен в [zapret](https://github.com/Flowseal/zapret-discord-youtube/) или в любое другое ПО, так как подсеть Cloudflare может быть заблокирована (например, в России).** | ||
|
|
||
| 5. В настройках `TgWsProxy` замените домен на свой. | ||
|
|
||
| 5. В настройках TgWsProxy поменяйте домен на свой | ||
| ## Благодарности | ||
|
|
||
| ## Mentions | ||
| Idea - https://github.com/Nekogram/WSProxy | ||
| Thanks to [@UjuiUjuMandan](https://github.com/UjuiUjuMandan) for the information | ||
| - Идея: https://github.com/Nekogram/WSProxy | ||
| - Спасибо [@UjuiUjuMandan](https://github.com/UjuiUjuMandan) за информацию. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| # Fake TLS + upstream в nginx | ||
|
|
||
| Домен в параметре `--fake-tls-domain` должен указывать на тот же IP, на котором запущен прокси. | ||
|
|
||
| ## Пример `nginx.conf` для stream-модуля | ||
|
|
||
| ```nginx | ||
| upstream mtproto { | ||
| server 127.0.0.1:8446; | ||
| } | ||
|
|
||
| map $ssl_preread_server_name $sni_name { | ||
| hostnames; | ||
| example.com mtproto; | ||
| # if you have xray with selfsni running: | ||
| # sub.example.com www; | ||
| # default xray; | ||
| } | ||
|
|
||
| # upstream xray { | ||
| # server 127.0.0.1:8443; | ||
| # } | ||
| # | ||
| # upstream www { | ||
| # server 127.0.0.1:7443; | ||
| # } | ||
|
|
||
| server { | ||
| proxy_protocol on; | ||
| set_real_ip_from unix:; | ||
| listen 443; | ||
| proxy_pass $sni_name; | ||
| ssl_preread on; | ||
| } | ||
| ``` | ||
|
|
||
| ## Запуск прокси за Nginx | ||
|
|
||
| ```bash | ||
| python3 proxy/tg_ws_proxy.py \ | ||
| --port 8446 \ | ||
| --host 127.0.0.1 \ | ||
| --fake-tls-domain example.com \ | ||
| --proxy-protocol \ | ||
| --secret <32-hex-chars> | ||
| ``` | ||
|
|
||
| Ссылка для подключения будет в формате `ee`-секрета: | ||
|
|
||
| ```text | ||
| tg://proxy?server=your.domain.com&port=443&secret=ee<secret><domain_hex> | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Не надо менять оформление этого блока