Skip to content

feat: allow proxy bypassing with 'NONE' string#139

Open
AlejandroAkbal wants to merge 1 commit into
mainfrom
booru-outbound-proxy-bypass-15659793156989340818
Open

feat: allow proxy bypassing with 'NONE' string#139
AlejandroAkbal wants to merge 1 commit into
mainfrom
booru-outbound-proxy-bypass-15659793156989340818

Conversation

@AlejandroAkbal

@AlejandroAkbal AlejandroAkbal commented Jul 16, 2026

Copy link
Copy Markdown
Member
  • Added 'NONE' as a valid magic string value for baseUrl in BooruOutboundProxyPolicy.
  • Updated validateOutboundProxyPolicy to intercept 'NONE' and avoid triggering normal URL validation checks.
  • Modified the monkey-patched method interceptors inside applyOutboundProxy to check for proxyPolicy.baseUrl === 'NONE' and return the upstream URL natively without wrapping it in a proxy.
  • Added comprehensive unit testing to booru.service.spec.ts to assert that proxy generation handles both bypass and rotating states seamlessly.

PR created automatically by Jules for task 15659793156989340818 started by @AlejandroAkbal

Summary by CodeRabbit

  • New Features
    • Added support for disabling outbound proxying for specific domains.
    • Requests configured to bypass the proxy now connect directly while retaining query and authentication parameters.
    • Proxy rotation continues correctly after a direct connection.

Introduces the ability to bypass outbound proxies selectively in `booruQueriesDTO` proxy rotation settings. By explicitly supplying `"NONE"` as the `baseUrl` in the proxy policy, the system passes requests straight to the original origin without wrapping them in proxy URLs, enabling hybrid "some proxy, some direct" configurations (and thus naturally letting direct connections take their turn within the same round-robin schedule).
@google-labs-jules

Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 1824a7c6-4ea4-4e09-b7e9-cb905f35dc3f

📥 Commits

Reviewing files that changed from the base of the PR and between ac64e06 and 7c72ab1.

📒 Files selected for processing (2)
  • src/booru/booru.service.spec.ts
  • src/booru/booru.service.ts
📜 Recent review details
🧰 Additional context used
📓 Path-based instructions (3)
src/**/*.ts

📄 CodeRabbit inference engine (AGENTS.md)

src/**/*.ts: Respect global validation behavior from createAppValidationPipe(): transform: true, whitelist: true, forbidNonWhitelisted: true
Do not leak auth_user, auth_pass, API keys, or equivalent credentials in errors/logs

Files:

  • src/booru/booru.service.ts
  • src/booru/booru.service.spec.ts
**/*.spec.ts

📄 CodeRabbit inference engine (AGENTS.md)

Keep test files as *.spec.ts near the implementation

Files:

  • src/booru/booru.service.spec.ts
src/**/*.spec.ts

📄 CodeRabbit inference engine (AGENTS.md)

Update/add tests when modifying DTO validation behavior, error mapping/sanitization, or response structure (meta, links)

Files:

  • src/booru/booru.service.spec.ts
🔇 Additional comments (2)
src/booru/booru.service.ts (1)

45-45: LGTM!

Also applies to: 424-424, 526-529

src/booru/booru.service.spec.ts (1)

308-335: LGTM!

Also applies to: 348-350, 369-374, 389-391


📝 Walkthrough

Walkthrough

Outbound proxy policies now accept baseUrl: "NONE" to bypass proxying for selected providers. URL construction preserves upstream query and authentication parameters, while rotation tests cover direct requests and continued proxy rotation.

Changes

Outbound Proxy Bypass

Layer / File(s) Summary
NONE policy validation
src/booru/booru.service.ts
Outbound proxy policies accept the NONE sentinel and normalize it with targetParam set to q, without URL or HTTPS validation.
Direct URL application and rotation coverage
src/booru/booru.service.ts, src/booru/booru.service.spec.ts
URL construction returns the upstream URL unchanged for NONE; tests cover preserved query/auth parameters, direct URLs during rotation, and rotation behavior for non-fetching APIs.

Possibly related PRs

  • Rule-34/API#138: Adds the outbound proxy rotation configuration that this change extends with the NONE bypass sentinel.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and accurately summarizes the main change: supporting 'NONE' as a proxy-bypass value.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch booru-outbound-proxy-bypass-15659793156989340818
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch booru-outbound-proxy-bypass-15659793156989340818

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install timed out. The project may have too many dependencies for the sandbox.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

1 participant