Giter Club home page Giter Club logo

Comments (9)

daig0rian avatar daig0rian commented on June 1, 2024 2

とりあえず対応してみましたが手元にテスト環境がないのでテストをお願い出来ますでしょうか。
Google Play storeでベータテストに参加するか、リリース 1.19 のapkファイルをサイドロードすることによりテストできます。

from epcltvapp.

5ym avatar 5ym commented on June 1, 2024 1

早々対応ありがとうございます
https://user:[email protected]/api/
のような形式で入力はできたのですが,録画リストが表示されません
エラーなどは出ておらず,epgstationのログを確認したところアクセス自体がそもそも来ていないようです

from epcltvapp.

daig0rian avatar daig0rian commented on June 1, 2024 1

検証ありがとうございます。なるほどですね。

どういう状態かわからなかったので、私も nginx でSSL + Basic Auth. するリバプロ構築してみました。
その結果、 https://user:[email protected]/api/ というように user:pass を追加したところで、 このアプリのREST API処理に使われているライブラリの retrofit2 (okhttp3)では user:pass の部分は無視しているようでした。

この状態でもアプリから リクエスト自体は出ています。EPGStationログに出ていないのは、前段のリバプロで認証失敗して落とされているのが原因かと思います。( nginxのログには 認証が失敗したことが出てた)

ちょっと検討してみます。

from epcltvapp.

daig0rian avatar daig0rian commented on June 1, 2024 1

リリース 1.20 でSSL + Basic Auth.が動作することを確認しました。
先ほどストアに流しましたので、逐次リリースされるかと思います。

以下蛇足です。
本アプリが使うライブラリはどちらもメジャーどころのようですが、 UserInfo を含むURLを渡してもライブラリから発行されるhttp/httpsリクエストには認証ヘッダを乗せてくれませんでした。
これはおそらくRFC3986にあるように、

"user:password"形式のUserInfo は推奨されず
アプリケーションはそのようなデータを無視するか、または拒絶するのを選ぶ事ができる

といった事情があるのかと思われます。

とはいえ、ストリーミング界隈ではたいていのプレーヤーは"user:password"形式のUserInfoを解釈しそれに応じたリクエストを投げてくれるのでそちらがスタンダードなように思います。

今回は設定されたBaseURLを ParseしてUserInfoを得て、それぞれのライブラリに設定する改修を入れています。

retrofit2 (okhttp3) のBasic認証対応
 > https://stackoverflow.com/questions/43366164/retrofit-and-okhttp-basic-authentication
GlideのBasic認証対応
 > bumptech/glide#1579

一方で外部プレーヤは 認証ヘッダをきちんと理解してリクエストを投げてくれる様子で、問題なく再生できました。
(内蔵プレーヤーは放置しています。)

from epcltvapp.

5ym avatar 5ym commented on June 1, 2024

fqdnを設定値として設定できるようにとbasic認証への対応を検討していただけないでしょうか
外部から使用するのが困難です

from epcltvapp.

daig0rian avatar daig0rian commented on June 1, 2024

UIを検討するうえで参考に教えてほしいのですが、どういった形でEPGStationを外部公開されているのでしょうか?

l3tnun/EPGStation#230

  • EPGStation V1.x.x のBasic認証はそのまま外部公開して使することを意図されていないこと

https://twitter.com/l3tnun/status/1312711924467920898

  • Basic認証は EPGStation V2.x.x から廃止されたこと

こうした理由から、EPGStation そのものを(ポートマッピングなどで)そのまま外に公開することは考えづらく、Reverse Proxyなどを設置されていると推測いたしますが、そうなるとEPGStation の API の Base URL がどういう形になるのか想像がつきませんでした。

from epcltvapp.

5ym avatar 5ym commented on June 1, 2024

traefikでSSL対応&basic認証をしているのですがプロキシ時にパスの追加等は行っておらず本来の仕様通りのパスになります
image

ちなみにkodiなどでiptvを利用する際はhttps://user:[email protected]のような形で入力してます

from epcltvapp.

daig0rian avatar daig0rian commented on June 1, 2024

なるほど、URLスキームも https になるのですね。(現在は httpで決め打ちしています)
いまはTV のリモコンで文字入力する都合上なるべく文字を少なくするために、 IPv4 アドレス + ポート番号 だけを入力させる形にしていますが、それとは別にAdvancedな設定項目として ”https://user:[email protected]/api/” のようにAPI の Base URL そのものが入力できるフォームを作ったほうがよさそう、と理解しました。

from epcltvapp.

5ym avatar 5ym commented on June 1, 2024

補足としてhttpでbasic認証を行うとヘッダー内のbasic認証キーが解読できてしまうため外部にbasic認証で公開する場合はSSL(HSTSがあった方が良い)が必須だと思います

from epcltvapp.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.