Skip to content

feat: configurable tester anonymity-check URL (TEST_ANONYMOUS_URL) (#109) - #234

Merged
Germey merged 1 commit into
masterfrom
feature/configurable-test-url
Jul 4, 2026
Merged

feat: configurable tester anonymity-check URL (TEST_ANONYMOUS_URL) (#109)#234
Germey merged 1 commit into
masterfrom
feature/configurable-test-url

Conversation

@Germey

@Germey Germey commented Jul 4, 2026

Copy link
Copy Markdown
Member

背景

Issue 收敛计划 Phase 4c(增强:可配置匿名检测地址),对应 #109

⚠️ stacked PR:基于 fix/core-runtime-bugs(#229)。建议 #229 合并后合并,GitHub 会自动重定向 base。

问题

tester 里 url = 'https://httpbin.org/ip'硬编码的。#109 希望能自建 httpbin 提高测试速度;此外公共 httpbin.org 限流/异常也是 tester 报错(如 #208LineTooLong/ContentTypeError)的一个诱因。

改动

  • setting.py:新增 TEST_ANONYMOUS_URL(默认 https://httpbin.org/ip)。
  • processors/tester.py:匿名/出口 IP 检测改用 TEST_ANONYMOUS_URL
  • README.md:补充 TEST_ANONYMOUS_URL(及 TEST_ANONYMOUS)说明。

用法(配合 #109 的自建 httpbin)

services:
  httpbin:
    image: kennethreitz/httpbin
    ports: ["8080:80"]
  proxypool:
    environment:
      TEST_ANONYMOUS_URL: http://httpbin/ip

说明

  • 检测地址需返回 httpbin 兼容格式({"origin": "1.2.3.4"})。
  • 默认值不变,行为向后兼容。
  • setting.py / tester.py 编译通过。

关联 issue

@Germey
Germey changed the base branch from fix/core-runtime-bugs to master July 4, 2026 08:46
…MOUS_URL

- setting: add TEST_ANONYMOUS_URL (default https://httpbin.org/ip)

- tester: use TEST_ANONYMOUS_URL instead of the hardcoded httpbin.org endpoint so users can self-host httpbin and avoid public rate limits

- README: document TEST_ANONYMOUS_URL and TEST_ANONYMOUS

Closes #109
@Germey
Germey force-pushed the feature/configurable-test-url branch from 8eb4fc1 to 72d32ef Compare July 4, 2026 08:48
@Germey
Germey merged commit cabcd96 into master Jul 4, 2026
@Germey
Germey deleted the feature/configurable-test-url branch July 4, 2026 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[enhancement] 建议使用自建httpbin服务,提高tester速度

1 participant