{"id":41689392,"url":"https://github.com/elisey/ipbot","last_synced_at":"2026-01-24T20:10:37.693Z","repository":{"id":321283299,"uuid":"1085249379","full_name":"elisey/ipbot","owner":"elisey","description":null,"archived":false,"fork":false,"pushed_at":"2026-01-23T01:41:09.000Z","size":1481,"stargazers_count":0,"open_issues_count":8,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-23T18:48:56.889Z","etag":null,"topics":["bot","docker","ip","networking","python","telegram-bot"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elisey.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-10-28T19:29:12.000Z","updated_at":"2026-01-17T14:00:09.000Z","dependencies_parsed_at":"2025-10-28T21:28:04.522Z","dependency_job_id":"5ec41265-207a-4c72-a992-7996f5e97732","html_url":"https://github.com/elisey/ipbot","commit_stats":null,"previous_names":["elisey/ipbot"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/elisey/ipbot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elisey%2Fipbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elisey%2Fipbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elisey%2Fipbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elisey%2Fipbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elisey","download_url":"https://codeload.github.com/elisey/ipbot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elisey%2Fipbot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28736498,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T19:23:36.361Z","status":"ssl_error","status_checked_at":"2026-01-24T19:23:28.966Z","response_time":89,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["bot","docker","ip","networking","python","telegram-bot"],"created_at":"2026-01-24T20:10:36.838Z","updated_at":"2026-01-24T20:10:37.688Z","avatar_url":"https://github.com/elisey.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IP Bot\n\n[![Release - Docker Build and Publish](https://github.com/elisey/ipbot/actions/workflows/ci-docker-publish.yml/badge.svg)](https://github.com/elisey/ipbot/actions/workflows/ci-docker-publish.yml)\n\nA simple async Telegram bot that responds to the `/ip` command with the public IP address of the server where the bot is running.\n\nThe bot fetches the address using multiple external IP detection services in parallel for reliability, works behind NAT, and restricts access to a single authorized Telegram user defined in the configuration file.\n\n![chat](doc/chat.png)\n\n## Features\n\n- Async Telegram bot using python-telegram-bot\n- **Resilient parallel fetching** from multiple IP providers (ipify.org, ident.me, ifconfig.me, ipinfo.io)\n- **Consensus-based validation** - shows IP only when all providers agree\n- **Detailed status view** - shows each provider's result with color-coded indicators\n- Authorization based on Telegram user ID\n- Dockerized deployment\n- Configuration via environment variables\n\n## Quick Start\n\n### 1. Get Your Telegram Credentials\n\n#### Create a Telegram Bot\n\n1. Open Telegram and search for [@BotFather](https://t.me/BotFather)\n2. Send `/newbot` command\n3. Follow the prompts to choose a name and username for your bot\n4. BotFather will give you a token like: `123456789:ABCdefGHIjklMNOpqrsTUVwxyz`\n5. Save this token - you'll need it for configuration\n\n#### Get Your Telegram User ID\n\n1. Open Telegram and search for [@userinfobot](https://t.me/userinfobot)\n2. Send `/start` command\n3. The bot will reply with your user ID (a number like `123456789`)\n4. Save this ID - only this user will be able to use your IP bot\n\n### 2. Run the Bot with Docker\n\n#### Option 1: Use Pre-built Image from GitHub Container Registry\n\nPull the latest image:\n\n```bash\n# Pull the image\ndocker pull ghcr.io/elisey/ipbot:latest\n```\n\nCreate a `.env` file with your credentials:\n\n```bash\nTELEGRAM_TOKEN=your_bot_token_here\nTELEGRAM_OWNER_ID=123456789\n```\n\nCreate a `docker-compose.yml` file:\n\n```yaml\nservices:\n  ip-bot:\n    image: ghcr.io/elisey/ipbot:latest\n    container_name: ipbot\n    env_file:\n      - .env\n    restart: always\n```\n\nStart the bot:\n\n```bash\n# Start the bot\ndocker compose up -d\n\n# View logs\ndocker compose logs -f\n\n# Stop the bot\ndocker compose down\n```\n\n#### Option 2: Build Locally\n\nClone the repository:\n\n```bash\ngit clone https://github.com/elisey/ipbot.git\ncd ipbot\n```\n\nCreate a `.env` file:\n\n```bash\ncp .env.example .env\n# Edit .env and add your TELEGRAM_TOKEN and TELEGRAM_OWNER_ID\n```\n\nRun with docker-compose:\n\n```bash\ndocker compose up -d\n```\n\n### 3. Test the Bot\n\nOpen Telegram and send `/ip` to your bot. It should respond with your public IP address.\n\n## Configuration\n\nThe bot is configured via environment variables in the `.env` file:\n\n- `TELEGRAM_TOKEN` (required): Your bot token from @BotFather\n- `TELEGRAM_OWNER_ID` (required): Your Telegram user ID - only this user can use the bot\n- `FETCHER_STRATEGY_ORDER` (optional): IP fetchers to use, default: `all`\n\n### Available IP Fetchers\n\nThe bot supports multiple IP detection providers:\n\n- `ipify` - ipify.org JSON API\n- `identme` - ident.me plain text API\n- `ifconfig` - ifconfig.me plain text API\n- `ipinfo` - ipinfo.io plain text API\n- `custom` - custom plain text API\n\n**Example configurations:**\n\n```bash\n# Use all fetchers (default - most reliable)\nFETCHER_STRATEGY_ORDER=all\n\n# Use specific fetchers only\nFETCHER_STRATEGY_ORDER=ipify,identme,ifconfig\n\n# Use only two fetchers\nFETCHER_STRATEGY_ORDER=ipify,identme\n\n# Use single fetcher (less reliable)\nFETCHER_STRATEGY_ORDER=ipify\n```\n\n**The `all` keyword:** When you set `FETCHER_STRATEGY_ORDER=all`, the bot automatically uses all available IP providers. This is the recommended configuration as it provides maximum reliability. If you add new custom fetchers to your deployment, they will automatically be included when using `all`.\n\n### How the Bot Works\n\nThe bot fetches your IP from **all configured providers in parallel**:\n\n1. **All providers agree** → Shows your IP with green checkmarks ✅\n2. **Some providers fail** → Shows IP if remaining providers agree, marks failures with ❌\n3. **Providers return different IPs** → Shows \"unknown\" and displays all results with ⚠️\n\n## Troubleshooting\n\n### Bot doesn't respond to commands\n\n**Check your user ID:**\n- Verify `TELEGRAM_OWNER_ID` in `.env` matches your actual Telegram user ID\n- Get your ID from [@userinfobot](https://t.me/userinfobot) to confirm\n\n**Check bot token:**\n- Verify `TELEGRAM_TOKEN` is correct (no extra spaces)\n- Test the token by visiting: `https://api.telegram.org/bot\u003cYOUR_TOKEN\u003e/getMe`\n\n### \"Unauthorized\" message\n\nYour Telegram user ID doesn't match `TELEGRAM_OWNER_ID` in the configuration. Only the specified owner can use the bot.\n\n### Check logs\n\n```bash\n# View bot logs\ndocker compose logs -f ip-bot\n\n# View last 100 lines\ndocker compose logs --tail 100 ip-bot\n```\n\n## Documentation\n\n- **[Contributing Guide](doc/CONTRIBUTION.md)** - Development setup, testing, and architecture\n- **[Deployment Guide](doc/DEPLOYMENT.md)** - Production deployment with Docker and systemd\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felisey%2Fipbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felisey%2Fipbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felisey%2Fipbot/lists"}