Extend IMAP_PROXY_URL to accept http:// and https:// schemes in addition
to the existing socks5:// support. HTTP CONNECT tunneling is used for
both new schemes, with TLS to the proxy for https://. Proxy auth via
user:pass@ in the URL is supported for all schemes.
Refactors dialTLSViaSOCKS5 into a generic dialTLSViaProxy dispatcher.
Fixes#9
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
claudecode
requested review from codex 2026-04-28 10:57:34 +07:00
[High] AGENT.md:6, AGENT.md:12, AGENT.md:18, AGENT.md:89, AGENT.md:91 are unrelated to issue #9. This PR is scoped to IMAP proxy support, but it also changes repository process/instruction text (including removing the gh guidance). Our review rules explicitly fail scope creep, so these AGENT.md edits need to be dropped from this PR or moved into a separate issue/PR.
Validation:
gofmt -l .: OK
go vet ./...: OK
go test ./internal/mail/... -count=1: OK
go test ./... -count=1: OK
Các dòng agent đó tôi sửa nhầm tree. Tuy nhiên, ok để push vào, giúp các agent chạy ít tốn token hơn
> FAIL
>
> 1. [High] `AGENT.md:6`, `AGENT.md:12`, `AGENT.md:18`, `AGENT.md:89`, `AGENT.md:91` are unrelated to issue `#9`. This PR is scoped to IMAP proxy support, but it also changes repository process/instruction text (including removing the `gh` guidance). Our review rules explicitly fail scope creep, so these `AGENT.md` edits need to be dropped from this PR or moved into a separate issue/PR.
>
> Validation:
> - `gofmt -l .`: OK
> - `go vet ./...`: OK
> - `go test ./internal/mail/... -count=1`: OK
> - `go test ./... -count=1`: OK
Các dòng agent đó tôi sửa nhầm tree. Tuy nhiên, ok để push vào, giúp các agent chạy ít tốn token hơn
codex
approved these changes 2026-04-28 11:05:41 +07:00
Rechecked after the repo-owner feedback on comment #891: the AGENT.md changes are explicitly accepted, so they are no longer a blocking scope issue for this PR.
No blocking technical issues found in the IMAP proxy implementation.
Validation:
gofmt -l .: OK
go vet ./...: OK
go test ./internal/mail/... -count=1: OK
go test ./... -count=1: OK
Non-blocking:
AGENT.md:89 has a typo (Alway -> Always), but that can be cleaned up separately if you want.
PASS
Rechecked after the repo-owner feedback on comment `#891`: the `AGENT.md` changes are explicitly accepted, so they are no longer a blocking scope issue for this PR.
No blocking technical issues found in the IMAP proxy implementation.
Validation:
- `gofmt -l .`: OK
- `go vet ./...`: OK
- `go test ./internal/mail/... -count=1`: OK
- `go test ./... -count=1`: OK
Non-blocking:
- `AGENT.md:89` has a typo (`Alway` -> `Always`), but that can be cleaned up separately if you want.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Extends
IMAP_PROXY_URLto supporthttp://andhttps://proxy schemes (via HTTP CONNECT tunnel) in addition to the existingsocks5://support.Changes:
dialTLSViaSOCKS5into genericdialTLSViaProxydispatcherdialViaCONNECTfor HTTP CONNECT tunneling (bothhttp://andhttps://)dialViaSOCKS5helper preserving existing SOCKS5 behavioruser:pass@in URL for all schemesTest plan
All 18 tests pass covering:
UsesDirectDial_WhenProxyUnsetUsesProxyDial_WhenProxySetRejectsUnsupportedSchemeftp://→ errorRejectsMalformedURLSOCKS5_UsesDialContextWithTimeoutSOCKS5_SetsDeadlineForTLSHandshakeHTTPConnect_ReachesTLSHandshakeHTTPConnect_RejectsOnProxyFailureHTTPConnect_SendsProxyAuthHTTPConnect_DialErrorHTTPSConnect_ReachesTLSHandshakeAll pass clean.
Fixes #9
🤖 Generated with Claude Code
Các dòng agent đó tôi sửa nhầm tree. Tuy nhiên, ok để push vào, giúp các agent chạy ít tốn token hơn
PASS
Rechecked after the repo-owner feedback on comment
#891: theAGENT.mdchanges are explicitly accepted, so they are no longer a blocking scope issue for this PR.No blocking technical issues found in the IMAP proxy implementation.
Validation:
gofmt -l .: OKgo vet ./...: OKgo test ./internal/mail/... -count=1: OKgo test ./... -count=1: OKNon-blocking:
AGENT.md:89has a typo (Alway->Always), but that can be cleaned up separately if you want.