rkosegi / jdownloader-cli

JDownloader CLI tool written in Go
Apache License 2.0
20 stars 4 forks source link

Add support for direct connection to device #53

Open rkosegi opened 1 day ago

rkosegi commented 1 day ago

As asked in https://github.com/rkosegi/jdownloader-cli/issues/51#issuecomment-2472410498, evaluate what it takes to add support for direct connection between CLI and device (without involvement of my JD). This will probably need update in client library

HeyItsJono commented 1 day ago

For what it's worth, JD has a deprecated API available in the Advanced Settings flags. Under normal circumstances I think you connect via MyJD and then after authenticating the session it attempts to connect directly to local instances of JD and falls back to the MyJD relay if this fails, though how it does this is a black box and isn't really documented.

The deprecated API needs to be manually enabled via a flag (followed by a JD restart) and listens on port 3128. By default it only listens on localhost but another flag will allow LAN connections. It allows unauthenticated API calls to be made (same endpoints as the modern MyJD API), I think this is how that Python library attempts to connect to JD directly.

image

image