sdl icon indicating copy to clipboard operation
sdl copied to clipboard

Support for IP-based access to bypass DNS blocking (CUII)

Open 32n1 opened this issue 11 months ago • 4 comments

German ISPs are blocking s.to via DNS (CUII DNS-Sperre). Users can access the site via the direct IP address 186.2.175.5, but sdl currently fails with:

  1. Cannot read properties of null (reading 'innerText') - the page isn't fully loaded when the title is queried
  2. SSL certificate errors when following redirects

Root causes:

  • The title element selector works, but the page isn't fully loaded when queried via execute(). The site now requires waiting for dynamic content.
  • The IP-based URL isn't recognized by the URL regex pattern.
  • Chrome blocks the self-signed certificate on the IP address.
  • The reqwest HTTP client rejects the self-signed certificate when following redirects from /redirect/ endpoints.

Working fix (tested locally):

src/downloaders/aniworldserienstream.rs:

  • Add IP address 186.2.175.5 as a new Site variant
  • Extend URL regex to match IP-based URLs
  • Replace execute() with element query + wait for title extraction

src/chrome.rs:

  • Add --ignore-certificate-errors flag to Chrome capabilities

src/download.rs:

  • Add danger_accept_invalid_certs(true) to the reqwest client

Happy to submit a PR if you're interested.

32n1 avatar Dec 13 '25 01:12 32n1

Hmm, why not simply change your DNS servers?

Funami580 avatar Dec 13 '25 07:12 Funami580

I did, but that wasn't the only issue. Its also https/http. I solved it for myself anyway. Would just be convinient for others. Its not a discussion, i just wanted to help.

Best

32n1 avatar Dec 13 '25 17:12 32n1

This is the only issue apparent to me:

Cannot read properties of null (reading 'innerText') - the page isn't fully loaded when the title is queried

Could you explain what you mean by https/http issue if you use s.to with custom DNS?

Funami580 avatar Dec 13 '25 17:12 Funami580

I just tried to download an episode and did not hit the title issue. Did this only happen on a specific site? When I open the source code of the page, the title is there, so it does not seem to be loaded with javascript in an asynchronous way.

Funami580 avatar Dec 14 '25 20:12 Funami580