-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
オブジェクトストレージとの通信にProxyを使うかを選択できるように #6245
オブジェクトストレージとの通信にProxyを使うかを選択できるように #6245
Conversation
バージョン変えてビルドして5秒あけて2回リロードすればいけるはず |
された thanks |
@@ -11,7 +11,7 @@ export function getS3(meta: Meta) { | |||
sslEnabled: meta.objectStorageUseSSL, | |||
s3ForcePathStyle: !!meta.objectStorageEndpoint, | |||
httpOptions: { | |||
agent: meta.objectStorageUseSSL ? httpsAgent : httpAgent | |||
agent: meta.objectStorageUseProxy ? (meta.objectStorageUseProxy ? httpsAgent : httpAgent) : undefined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SSL で Prxoyを使う場合 HttpsProxyAgent
SSL で Prxoyを使う場合 https.Agent
非SSL で Prxoyを使う場合 HttpProxyAgent
非SSL で Prxoyを使う場合 http.Agent
なのでこれだとちょっと挙動が違う
結局下のところを分解しないといけない
https://github.com/syuilo/misskey/blob/c62aff76af427eb5f7cff0ddc835996754785f44/src/misc/fetch.ts#L30-L42
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
別にproxy入る前はundefined相当だったしundefined返せばよいのではという気持ち
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
undefinedだと (httpsでも) keep-aliveなどが効かなくなるのでパフォーマンスが悪くなります
proxyとkeep-aliveは同時に入れていってます
- httpsのproxyとkeep-alive対応 を追加
- httpもproxyとkeep-alive対応 を追加
(httpに) proxy入る前は (httpは) undefined相当 だったけど
(https) は proxyとkeep-alive が入った状態です
いちおう、これの変更は https://github.com/syuilo/misskey/pull/6244 にマージして修正しています |
#6244をマージしたのでこちらは閉じます。 |
Summary
Fix #6243