Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Serve PAC file to selectively proxy only watched hosts

オープン
#1,531 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
38/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
csharp

調査の方向性

まず、既存の API controller と、システムプロキシ設定を切り替えるコードを調べます。urlsToWatch がどのように設定されているかを追跡し、そのうえで /proxy.pac endpoint とプラットフォーム固有の自動設定をどのように組み込めるかを判断します。監視対象のホストがプロキシ経由でルーティングされ、それ以外のトラフィックが DIRECT を返し、endpoint が必要な PAC MIME タイプを提供すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Currently, when Dev Proxy runs as a system proxy, all HTTP/HTTPS traffic flows through it. Dev Proxy filters requests internally based on urlsToWatch, but unrelated traffic still takes the detour through the proxy. This can cause issues with services that are sensitive to proxying (e.g., Azure Functions startup, Teams auth) and adds unnecessary latency to non-watched traffic.

Proposal: Have Dev Proxy serve a PAC (Proxy Auto-Config) file that routes only watched hosts through the proxy. All other traffic goes direct.

How it would work:

  1. Dev Proxy generates a FindProxyForURL() script from the configured urlsToWatch hosts
  2. Serves it at an endpoint like http://127.0.0.1:{port}/proxy.pac with MIME type application/x-ns-proxy-autoconfig
  3. Instead of setting the system HTTP/HTTPS proxy, sets the system's auto-config URL to point to this PAC file
    • macOS: networksetup -setautoproxyurl <service> http://127.0.0.1:{port}/proxy.pac
    • Windows: set AutoConfigURL registry key or use the proxy library equivalent

Example generated PAC file for urlsToWatch: ["https://graph.microsoft.com/*", "https://api.contoso.com/*"]:

function FindProxyForURL(url, host) {
  if (shExpMatch(host, "graph.microsoft.com") ||
      shExpMatch(host, "api.contoso.com")) {
    return "PROXY 127.0.0.1:8000";
  }
  return "DIRECT";
}

Limitations:

  • PAC files operate at the host level, not URL-path level. Fine-grained URL matching still happens inside the proxy as it does today.
  • Linux doesn't have a standard system-wide auto-config URL mechanism (same limitation as the current system proxy setup).

Benefits:

  • Non-watched traffic never touches the proxy — faster, fewer side effects
  • Could resolve issues with Azure Functions, Teams auth, and other services that break when proxied
  • Minimal implementation surface — Dev Proxy already has an API controller and already toggles system proxy settings

Derived from https://github.com/dotnet/dev-proxy/issues/1368.

主要言語
C#
スター
833
フォーク
90
平均マージ
18時間 41分
マージ済み PR(30日)
45

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

dotnet/dev-proxy のほかの issue

dotnet/dev-proxy の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。