Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 0 additions & 94 deletions .circleci/config.yml

This file was deleted.

59 changes: 59 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python

# Virtual environments
.venv/
venv/
env/
ENV/

# Testing
.pytest_cache/
.coverage
htmlcov/
.tox/

# IDEs
.vscode/
.idea/
*.swp
*.swo
*~

# OS
.DS_Store
Thumbs.db

# Logs
*.log

# Git
.git/
.gitignore

# Documentation
CHANGELOG.md
CODE_OF_CONDUCT.md
CONTRIBUTING.md
DEVELOPMENT.md
LICENSE
README.md

# Old bash script
*.sh.bak

# Build artifacts
build/
dist/
*.egg-info/

# uv
uv.lock

# Linter caches
.ruff_cache/
.mypy_cache/
47 changes: 47 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Release Docker image

on:
push:
tags:
- "*"

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (use tag as image tag)
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=ref,event=tag

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
34 changes: 34 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Test

on:
push:
branches: [main, master, develop]
pull_request:

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install uv
run: pip install uv

- name: Create virtual environment and install dependencies
run: uv venv && uv pip install -e ".[dev]"

- name: Run tests
run: make test

- name: Run linters
run: make lint

- name: Run linters
run: make lint
54 changes: 54 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python

# Virtual environments
venv/
env/
ENV/
.venv/

# Testing
.pytest_cache/
.coverage
htmlcov/
.tox/
.coverage.*

# IDEs
.vscode/
.idea/
*.swp
*.swo
*~

# OS
.DS_Store
Thumbs.db

# Logs
*.log

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
41 changes: 37 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,51 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
## [2.0.0] - 2025-02-08

### Added
- Complete rewrite in Python 3.12+ for better maintainability
- Modular DNS provider architecture for easy extensibility
- Porkbun DNS provider support
- Multiple IP checker services with automatic failover:
- icanhazip.com
- ipify.org
- ifconfig.me
- Structured logging with configurable log levels
- `--once` and `--dry-run` CLI flags for testing
- Comprehensive test suite with pytest
- Support for multiple DNS providers simultaneously
- Base classes for DNS providers and notifiers

### Changed
- Uses `requests` library for HTTP queries instead of curl
- Configuration file format extended (backward compatible with v1.x)
- Docker image now Python-based (smaller, more maintainable)
- Improved error handling and retry logic
- Better logging and debugging capabilities

### Deprecated
- Bash version is no longer maintained

### Removed
- Bash implementation (replaced by Python)

### Fixed
- Better handling of network failures and API errors
- More robust IP validation
- Cleaner separation of concerns between providers

## [v1.0.1](https://github.com/caldito/ipwarn/tree/v1.0.1) - 2022-12-29
## [v1.0.1] - 2022-12-29
[Full changelog](https://github.com/caldito/ipwarn/compare/v1.0.0...v1.0.1)
### Fixed
- Docker instructions in README.md
- Fix pipelines for releasing multi-arch docker images

## [v1.0.0](https://github.com/caldito/ipwarn/tree/v1.0.0) - 2022-12-28
## [v1.0.0] - 2022-12-28
[Full changelog](https://github.com/caldito/ipwarn/compare/v0.1.0...v1.0.0)
### Added
- Refactor to a design in which the program runs indefinitely in the background
Expand All @@ -23,6 +56,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Systemd easy install script
- Changelog

## [v0.1.0](https://github.com/caldito/ipwarn/tree/v0.1.0)
## [v0.1.0]
### Added
- Initial version
14 changes: 13 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ email, or any other method with the owners of this repository before making a ch

Please note we have a code of conduct, please follow it in all your interactions with the project.

## Development Setup

For detailed development setup information, see [DEVELOPMENT.md](https://github.com/caldito/ipwarn/blob/master/DEVELOPMENT.md).

Quick start:
```bash
make setup # Setup development environment
make test # Run tests
make format # Format code
make lint # Run linters
```

## Pull Request Process

- Pull requests are submitted to the `develop` branch
Expand All @@ -13,4 +25,4 @@ Please note we have a code of conduct, please follow it in all your interactions
- Once merged into develop the project maintainers will create a new release shortly

## Code of Conduct
Please read [CODE_OF_CONDUCT.md](https://github.com/pablogcaldito/ipwarn/blob/master/CODE_OF_CONDUCT.md) for details on our code of conduct.
Please read [CODE_OF_CONDUCT.md](https://github.com/caldito/ipwarn/blob/master/CODE_OF_CONDUCT.md) for details on our code of conduct.
Loading
Loading