{"id":30290407,"url":"https://github.com/capcom6/phone2tg-proxy","last_synced_at":"2026-04-09T05:03:56.382Z","repository":{"id":310010995,"uuid":"1038377192","full_name":"capcom6/phone2tg-proxy","owner":"capcom6","description":"🚀 Bridge your phone contacts to Telegram! This Go service lets you send messages to Telegram users via their phone numbers, with secure storage and a clean API. 📞➡️✈️","archived":false,"fork":false,"pushed_at":"2026-01-28T01:08:42.000Z","size":144,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-01-28T17:42:12.102Z","etag":null,"topics":["api-proxy","backend","golang","phone-number-lookup","redis","service","telegram-bot"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/capcom6.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-15T04:53:04.000Z","updated_at":"2026-01-28T01:08:17.000Z","dependencies_parsed_at":"2025-08-15T06:26:15.892Z","dependency_job_id":"cfe63f40-75ef-43e9-9659-77774004a9a5","html_url":"https://github.com/capcom6/phone2tg-proxy","commit_stats":null,"previous_names":["capcom6/phone2tg-proxy"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/capcom6/phone2tg-proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capcom6%2Fphone2tg-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capcom6%2Fphone2tg-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capcom6%2Fphone2tg-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capcom6%2Fphone2tg-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/capcom6","download_url":"https://codeload.github.com/capcom6/phone2tg-proxy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capcom6%2Fphone2tg-proxy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31586413,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"online","status_checked_at":"2026-04-09T02:00:06.848Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-proxy","backend","golang","phone-number-lookup","redis","service","telegram-bot"],"created_at":"2025-08-16T23:13:06.795Z","updated_at":"2026-04-09T05:03:56.364Z","avatar_url":"https://github.com/capcom6.png","language":"Go","readme":"# Phone Number to Telegram Proxy\n\n[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\nA service that allows sending messages to Telegram users by specifying their phone numbers.\n\n## Table of Contents\n- [Phone Number to Telegram Proxy](#phone-number-to-telegram-proxy)\n  - [Table of Contents](#table-of-contents)\n  - [Features](#features)\n  - [Installation](#installation)\n    - [Prerequisites](#prerequisites)\n    - [Using Pre-built Binaries (Recommended)](#using-pre-built-binaries-recommended)\n    - [Using Docker (Recommended)](#using-docker-recommended)\n    - [From Source (Alternative)](#from-source-alternative)\n  - [Configuration](#configuration)\n    - [Environment Variables](#environment-variables)\n    - [Configuration File](#configuration-file)\n  - [Usage](#usage)\n    - [Using the API](#using-the-api)\n    - [Using the Telegram Bot](#using-the-telegram-bot)\n  - [API Documentation](#api-documentation)\n    - [Endpoints](#endpoints)\n      - [Send Message](#send-message)\n  - [Contributing](#contributing)\n  - [License](#license)\n\n\n## Features\n\n- **Phone Number to Telegram Proxy**: Send messages to Telegram users by specifying their phone number\n- **State Management**: Finite State Machine (FSM) for handling bot interactions\n- **Secure Storage**: Phone numbers are hashed for security\n- **Modular Architecture**: Well-structured components for maintainability\n- **Dependency Injection**: Using Uber FX for better testability\n- **Internationalization (i18n)**: Multi-language support with English and Russian translations\n\n## Installation\n\n### Prerequisites\n\n- Redis server\n- Telegram Bot Token\n\n### Using Pre-built Binaries (Recommended)\n\n1. Go to the [GitHub Releases](https://github.com/capcom6/phone2tg-proxy/releases) page\n2. Download the pre-built binary for your operating system and architecture\n3. Make the binary executable:\n   ```bash\n   chmod +x phone2tg-proxy-linux-amd64\n   ```\n4. Run the binary:\n   ```bash\n   ./phone2tg-proxy-linux-amd64\n   ```\n\n### Using Docker (Recommended)\n\n1. Pull the latest image:\n   ```bash\n   docker pull ghcr.io/capcom6/phone2tg-proxy:latest\n   ```\n2. Run the container:\n   ```bash\n   docker run -d \\\n     --env TELEGRAM__TOKEN=your_telegram_bot_token \\\n     --env REDIS__URL=redis://localhost:6379/0 \\\n     --env STORAGE__SECRET=your_storage_secret \\\n     --publish 3000:3000 \\\n     --name phone2tg-proxy \\\n     ghcr.io/capcom6/phone2tg-proxy:latest\n   ```\n\n### From Source (Alternative)\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/capcom6/phone2tg-proxy.git\n   cd phone2tg-proxy\n   ```\n\n2. Download dependencies:\n   ```bash\n   go mod download\n   ```\n\n3. Build and run:\n   ```bash\n   go run main.go\n   ```\n\n## Configuration\n\nThe service can be configured using environment variables or a configuration file.\n\n### Environment Variables\n\n| Variable                  | Description                     | Default                    |\n| ------------------------- | ------------------------------- | -------------------------- |\n| `HTTP__ADDRESS`           | HTTP server address             | `127.0.0.1:3000`           |\n| `HTTP__PROXY_HEADER`      | HTTP proxy header               | `X-Forwarded-For`          |\n| `HTTP__PROXIES`           | HTTP trusted proxies            | empty                      |\n| `TELEGRAM__TOKEN`         | Your Telegram bot token         | Required                   |\n| `REDIS__URL`              | Redis connection URL            | `redis://localhost:6379/0` |\n| `STORAGE__SECRET`         | Secret for phone number hashing | Required                   |\n| `I18N__DEFAULT_LANGUAGE`  | Default language                | `en`                       |\n| `I18N__TRANSLATIONS_PATH` | Translations path               | `i18n/locales`             |\n\n### Configuration File\n\nCreate a `.env` file in the project root with your configuration:\n\n```env\nTELEGRAM__TOKEN=your_telegram_bot_token\nREDIS__URL=redis://localhost:6379/0\nSTORAGE__SECRET=your_storage_secret\n```\n\n## Usage\n\n### Using the API\n\nThe service provides a REST API for sending messages. See the [API Documentation](#api-documentation) for details.\n\n### Using the Telegram Bot\n\n1. Start a chat with your bot\n2. Send `/start` to register your phone number\n3. Send your contact to associate your phone number with your Telegram account\n4. You can now use this bot to send messages to registered users by providing their phone numbers.\n\n## API Documentation\n\nThe service provides a REST API for sending messages.\n\n### Endpoints\n\n#### Send Message\n\n- **URL**: `/api/v1/messages`\n- **Method**: `POST`\n- **Description**: Send a message to a user by phone number. The phoneNumber must be in E.164 format. Validation failures will occur if the format is not followed.\n- **Request Body**:\n  ```json\n  {\n    \"phoneNumber\": \"string (E.164 format, e.g., +1234567890)\",\n    \"text\": \"string\"\n  }\n  ```\n- **Response**:\n  ```json\n  {\n    \"id\": \"integer\"\n  }\n  ```\n- **Error Responses**:\n  - `400 Bad Request`: Invalid request format\n  - `404 Not Found`: Phone number not found\n  - `500 Internal Server Error`: Server error\n\n## Contributing\n\nContributions are welcome! Please follow these steps:\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## License\n\nThis project is licensed under the Apache 2.0 License - see the [LICENSE](LICENSE) file for details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapcom6%2Fphone2tg-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcapcom6%2Fphone2tg-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapcom6%2Fphone2tg-proxy/lists"}