Skip to content
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

諸々のリクエストにプロキシを使えるようにする #2894

Closed
syuilo opened this issue Oct 12, 2018 · 7 comments · Fixed by #5226 or #5371
Closed

諸々のリクエストにプロキシを使えるようにする #2894

syuilo opened this issue Oct 12, 2018 · 7 comments · Fixed by #5226 or #5371
Assignees
Labels
✨Feature This adds/improves/enhances a feature packages/backend Server side specific issue/PR

Comments

@syuilo
Copy link
Member

syuilo commented Oct 12, 2018

Summary

Environment


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@xps2
Copy link
Contributor

xps2 commented Oct 12, 2018

うちのインスタンスでは、global-tuunel-ngで対応しているけど、
host名にポート番号が含まれてしまって、Mastodonのインスタンスに401返される問題が発生している。
とりあえずは、検証対象にhost外して対処しているけれども…
https://gitlab.com/misskey-tor/misskey/issues/5

@syuilo syuilo added ✨Feature This adds/improves/enhances a feature packages/backend Server side specific issue/PR labels Oct 12, 2018
@syuilo syuilo closed this as completed in 2b0a919 Oct 13, 2018
@xps2
Copy link
Contributor

xps2 commented Oct 13, 2018

https://github.com/syuilo/misskey/blob/35f91fa280243b748dd306439d22c081f2e9ad4f/src/remote/activitypub/request.ts#L25
がまだ対応していない

@syuilo syuilo reopened this Oct 13, 2018
@xps2
Copy link
Contributor

xps2 commented Feb 6, 2019

e1cc239 でHostを入れるようになったので、https://github.com/syuilo/misskey/issues/2894#issuecomment-429393224 の問題は解消、global-tunnel-ngで問題なくなりました。
ただ、プロキシを使う場合には、DNSキャッシュされると非常に困るのでその部分は削除してます。
(名前解決はMisskeyではなく、プロキシサーバが行わなければならないので)

@mei23
Copy link
Contributor

mei23 commented Mar 15, 2019

AP deliverだけが未対応でやりたいけどなかなかできない

Nodeでhttpsリクエストを出す方法はざっと2つ

  1. request (proxy対応) - AP deliver以外はこれを使用
  2. https (proxy非対応 (requestより低レイヤで処理)) - AP deliverはこれを使用

APにはHttpSignatureが必要、それに使ってるモジュールがhttp-signature
これがhttps`でRequestオブジェクトを作った後に使用する必要がある

requesthttp-signatureが使えればいいものの
requestはRequestオブジェクト生成後に処理を挟むことが出来ない
requestにはhttp-signatureモジュールを呼び出す専用の機能があるが
http-signature自体の実装が古く少しヘッダを整形する必要があるため、そのまま呼び出して使用することが出来ない。

おそらくhttp-signature
TritonDataCenter/node-http-signature#83 をマージしてくれればいいのだが
あまり保守されている様子がなく見込みがない。

対応するには、http-signaturerequestを両方forkする必要がある。
または、HTTP CONNECT に対応したProxy Clinetを書く必要がある。

@mei23
Copy link
Contributor

mei23 commented Jul 27, 2019

AP request Proxy対応できそう

@acid-chicken
Copy link
Member

Related to https://forum.fedeloper.jp/t/topic/68/5

@mei23
Copy link
Contributor

mei23 commented Oct 9, 2019

web-push がProxy使うっぽいわ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨Feature This adds/improves/enhances a feature packages/backend Server side specific issue/PR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants