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
14 changes: 14 additions & 0 deletions .github/actions/live-verification/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ runs:
BOOTSTRAPPED=true
break
fi
if [ "$i" -eq 12 ] || [ "$i" -eq 24 ]; then
echo "⚠️ Tor still at ${PROGRESS:-0}% after $((i * 5))s; restarting container to select a fresh directory mirror..."
docker restart torproxy-canary || true
fi
sleep 5
done

Expand Down Expand Up @@ -376,7 +380,9 @@ runs:
# capped at 180s with bounded polls, like the PR gate.
BOOTSTRAPPED=false
START=$SECONDS
ATTEMPT=0
while [ $((SECONDS - START)) -lt 180 ]; do
ATTEMPT=$((ATTEMPT + 1))
# Bootstrap progress, not /status "connected": the latter
# requires the external check.torproject.org egress probe,
# whose intermittent unreachability flaked this step
Expand All @@ -387,6 +393,10 @@ runs:
BOOTSTRAPPED=true
break
fi
if [ "$ATTEMPT" -eq 12 ] || [ "$ATTEMPT" -eq 24 ]; then
echo "⚠️ Gateway Tor still at ${PROGRESS:-0}% after $((SECONDS - START))s; restarting container to select a fresh directory mirror..."
docker restart torproxy-canary-gateway || true
fi
sleep 5
done
if [ "$BOOTSTRAPPED" != "true" ]; then
Expand Down Expand Up @@ -479,6 +489,10 @@ runs:
fi
break
fi
if [ "$i" -eq 12 ] || [ "$i" -eq 24 ]; then
echo "⚠️ GeoIP Tor still at ${PROGRESS:-0}% after $((i * 5))s; restarting container to select a fresh directory mirror..."
docker restart torproxy-canary-geoip || true
fi
sleep 5
done
if [ "$BOOTSTRAPPED" != "true" ]; then
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/publish-dockerhub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ jobs:
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
type=ref,event=tag
type=semver,pattern={{version}}
labels: |
io.modelcontextprotocol.server.name=io.github.hapheus/torproxy

- name: Build and publish image
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
Expand All @@ -71,6 +73,8 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
annotations: |
index,manifest:io.modelcontextprotocol.server.name=io.github.hapheus/torproxy
provenance: mode=max
sbom: true
cache-from: type=gha
Expand Down
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [2.7.4] — 2026-11-10

### Fixed
- **mcp**: Add required `io.modelcontextprotocol.server.name="io.github.hapheus/torproxy"` OCI label and annotations to Dockerfile and Docker Hub workflow (#141)
- **ci**: Add mid-window container restart fallback in live verification when Tor bootstrap stalls on a slow directory mirror (#141)

## [2.7.3] — 2026-11-10

### Fixed
Expand Down Expand Up @@ -229,7 +235,8 @@ Sprint 1 security & contract correctness release.

---

[Unreleased]: https://github.com/hapheus/torproxy/compare/v2.7.3...HEAD
[Unreleased]: https://github.com/hapheus/torproxy/compare/v2.7.4...HEAD
[2.7.4]: https://github.com/hapheus/torproxy/compare/v2.7.3...v2.7.4
[2.7.3]: https://github.com/hapheus/torproxy/compare/v2.7.2...v2.7.3
[2.7.2]: https://github.com/hapheus/torproxy/compare/v2.7.1...v2.7.2
[2.7.1]: https://github.com/hapheus/torproxy/compare/v2.7.0...v2.7.1
Expand Down
5 changes: 3 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ ARG PYTHON_VERSION=3.14

LABEL org.opencontainers.image.title="torproxy" \
org.opencontainers.image.description="A minimal HTTP proxy routed through Tor" \
org.opencontainers.image.version="2.7.3" \
org.opencontainers.image.version="2.7.4" \
org.opencontainers.image.licenses="MIT" \
org.opencontainers.image.source="https://github.com/hapheus/torproxy" \
org.opencontainers.image.url="https://github.com/hapheus/torproxy"
org.opencontainers.image.url="https://github.com/hapheus/torproxy" \
io.modelcontextprotocol.server.name="io.github.hapheus/torproxy"

RUN apk add --no-cache bash ca-certificates curl privoxy tini tor "python3~${PYTHON_VERSION}" iptables iptables-legacy libcap \
&& python3 --version \
Expand Down
5 changes: 5 additions & 0 deletions docs/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ If an upgraded image exhibits unexpected behavior in your environment:

## 6. Release Notes

### 2.7.4 (MCP Registry OCI label requirement and live bootstrap resilience)

- **MCP Registry OCI Label & Annotations (#141):** Added `LABEL io.modelcontextprotocol.server.name="io.github.hapheus/torproxy"` to `docker/Dockerfile` and OCI index/manifest annotations in `publish-dockerhub.yml`, satisfying the official MCP Registry verification requirement for OCI container packages.
- **Bootstrap Mirror Failover (#141):** Added mid-window container restart fallback in `live-verification/action.yml` when cold-start Tor consensus download stalls on an unresponsive directory mirror.

### 2.7.3 (DockerHub SemVer tagging and MCP Registry publish coordination)

- **DockerHub Tagging & MCP Publish Coordination (#138):** Added `type=semver,pattern={{version}}` to `publish-dockerhub.yml` so Docker Hub receives both `X.Y.Z` and `vX.Y.Z` tags. Added synchronization in `publish-mcp.yml` to wait for the target OCI container image to be verified on Docker Hub before publishing `server.json` to `registry.modelcontextprotocol.io`.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "torproxy"
version = "2.7.3"
version = "2.7.4"
description = "A minimal HTTP and SOCKS5 proxy routed through the Tor network with local REST control API"
readme = "README.md"
requires-python = ">=3.10"
Expand Down
4 changes: 2 additions & 2 deletions server.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
"name": "io.github.hapheus/torproxy",
"title": "torproxy",
"description": "Tor HTTP and SOCKS5 proxy with REST API and built-in MCP server.",
"version": "2.7.3",
"version": "2.7.4",
"repository": {
"url": "https://github.com/hapheus/torproxy",
"source": "github"
},
"packages": [
{
"registryType": "oci",
"identifier": "docker.io/hapheus/torproxy:2.7.3",
"identifier": "docker.io/hapheus/torproxy:2.7.4",
"transport": {
"type": "stdio"
},
Expand Down
3 changes: 3 additions & 0 deletions tests/unit/test_ci_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ def test_publish_mcp_waits_for_live_verification() -> None:
assert "needs: verify-live" in publish_mcp or "needs: [verify-live]" in publish_mcp
assert "id-token: write" in publish_mcp
assert "mcp-publisher login github-oidc" in publish_mcp
assert "docker manifest inspect" in publish_mcp
publish_dockerhub = _read("publish-dockerhub.yml")
assert "io.modelcontextprotocol.server.name=io.github.hapheus/torproxy" in publish_dockerhub


def test_daily_canary_reuses_the_shared_action() -> None:
Expand Down
2 changes: 2 additions & 0 deletions tests/unit/test_contracts.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,8 @@ def test_version_single_source_of_truth(self):
with open(server_json_path, "r", encoding="utf-8") as f:
server_data = json.load(f)
assert server_data["version"] == project_version
server_name = server_data["name"]
assert f'io.modelcontextprotocol.server.name="{server_name}"' in dockerfile
for pkg in server_data.get("packages", []):
if pkg.get("registryType") == "oci":
assert pkg["identifier"].endswith(f":{project_version}")
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading