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

dstack-ingress: add WebSocket proxy support

オープン 初心者向け
#87 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
76/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
docker, nginx

調査の方向性

setup_nginx_conf() を含むエントリポイントを見つけ、nginx location / ブロックをどのように生成しているかを調べます。そこで要求された WebSocket プロキシ設定を追加し、WebSocket リクエストが 101 Upgrade レスポンスを受け取る一方で、通常の HTTP トラフィックも引き続き機能することを確認します。

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

説明

The kvin/dstack-ingress:wildcard image generates its nginx config via setup_nginx_conf() in the entrypoint, but the location / block is missing WebSocket upgrade headers. Without these, any WebSocket service behind dstack-ingress gets HTTP 200 instead of 101 Upgrade.

Suggested fix: add these three lines to the location / block in setup_nginx_conf():

proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";

This is safe for mixed HTTP + WebSocket traffic. $http_upgrade is empty for regular HTTP requests, and upstreams ignore Connection: upgrade when there's no valid Upgrade value. proxy_http_version 1.1 is strictly better than the default 1.0 (also enables keepalive). This is the standard nginx pattern recommended in the nginx WebSocket docs.

Current workaround: override command in docker-compose to patch the generated config before starting nginx:

command:
  - bash
  - -c
  - |
    sed -i '/proxy_pass/a\        proxy_http_version 1.1;\n        proxy_set_header Upgrade $$http_upgrade;\n        proxy_set_header Connection "upgrade";' /etc/nginx/conf.d/default.conf
    exec nginx -g "daemon off;"
主要言語
Python
スター
27
フォーク
26
平均マージ
1日 6時間
マージ済み PR(30日)
12

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

Dstack-TEE/dstack-examples のほかの issue

Dstack-TEE/dstack-examples の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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