JDownloader Community - Appwork GmbH
 

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 10.03.2021, 16:38
Tedolly Tedolly is offline
Giga Loader
 
Join Date: Dec 2015
Posts: 99
Default customproxylist liefert keinen Usernamen und Passwort mehr

Code:
var settings = "org.jdownloader.updatev2.InternetConnectionSettings";
var storage = "cfg/org.jdownloader.settings.InternetConnectionSettings";
var a = callAPI("config", "get", settings, storage, "customproxylist");
alert(a);
Liefert bei mir:
...{
"proxy" : {
"username" : null, // obwohl in der Proxy-Liste belegt.
"password" : null, // obwohl in der Proxy-Liste belegt.
"port" : 4145.0, // im Export der Liste ist dies ohne ".0".
"address" : "72.210.252.137",
"type" : "SOCKS5",
"preferNativeImplementation" : false,
"resolveHostName" : false,
"connectMethodPrefered" : false
},
"rangeRequestsSupported" : true,
"filter" : null,
"pac" : false,
"reconnectSupported" : false,
"enabled" : true
}...

Kann das jemand bestätigen?

Ted
Reply With Quote
  #2  
Old 10.03.2021, 18:22
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

Working fine here. Most likely the file is not updated on disk. Try restating JD.
Reply With Quote
  #3  
Old 11.03.2021, 07:40
Tedolly Tedolly is offline
Giga Loader
 
Join Date: Dec 2015
Posts: 99
Default

Entschuldigung, ich hatte meinen Beitrag vergessen.
1-2 Stunden rumprobiert.
Neue Proxy-Liste eingefügt, Test-Scripte geschrieben, usw.
Dann JD-Update laufen lassen, auch ohne Besserung.
Nach 5 Minuten hier den Beitrag geschrieben.
Zurück zum Testen, und auf einmal läuft es normal!
Wie kann da sein? Hat sich die JD-API geändert und es dauert ein Weilchen, bis sie irgendwie aktiv ist?

Bitte ein paar Script-Fragen an den Meister mgpai. Wäre nett, wenn du irgendwann Zeit hättest und mir weiterhelfen könntest:

1. Gibt es eine blockierende Messagebox? Alert unterbricht wohl nicht.

2. Ich bekomme es nicht hin, dass callSync ein Windows-Programm (also kein Commandline-Prog) aufruft und den Exit Code liefert. Ich habe die Beispiele probiert (mit %Errorlevel% statt $?), nichts geht. Jetzt habe ich callAsync verwendet und warte mit while und sleep, bis eine lokale Variable x von 972942 auf was anderes springt. x belege ich in der Callback-Function mit dem exitCode: callAsync( function(exitCode,stdOut,errOut){x=exitCode}, myExe ). Das ist alles viel zu umständlich.

3. Kann man das gesamte "Script-System" innerhalb JD reseten? Wenn ich Scripte entwickle und viel herumprobiere, kommt da irgendwas durcheinander und ich bekomme äußerst seltsame Abläufe. Das betreffende Script zu löschen und neu anzulegen und etliche andere Sache funktionieren nicht. Wie du schon schriebst, es hilft nur JD zu restarten. Manchmal ist das Scriptsystem sogar völlig blockiert und JD reagiert auf garnichts mehr. Es hilft nur kill JD im Task-Manager.

4. callAPI: liegt diese API local auf meiner Platte oder geht das über die JD-Server? Überhaupt die Script-Sachen: passiert das local oder "sieht" die JD-Firma, was ich hier treibe?

Ted
Reply With Quote
  #4  
Old 11.03.2021, 08:48
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

Quote:
Originally Posted by Tedolly View Post
Wie kann da sein?
Some settings are saved only on exit. As I stated in my previous post, most likely your changes were not written to disk until you restarted JD.

Quote:
1. Gibt es eine blockierende Messagebox? Alert unterbricht wohl nicht.
No. It used to be 'sync' by default. Was changed recently to 'async' based on a users feedback.

Quote:
2. Ich bekomme es nicht hin, dass callSync ein Windows-Programm (also kein Commandline-Prog) aufruft und den Exit Code liefert.
If you need a reliable feedback, using callAsync with callback function is the best option.

Code:
callSync("cmd", "/c", "myExe", "2>nul", "||", "cmd", "/c", "echo myExitCode");
callSync("cmd", "/c", "myExe", "2>nul", "||", "cmd", "/c", "echo %errorlevel%");

Quote:
3. Kann man das gesamte "Script-System" innerhalb JD reseten?
No. Restating is the only option. If it happens too often, you can install/use another copy of JD just to test scripts.

Quote:
4. callAPI: liegt diese API local auf meiner Platte oder geht das über die JD-Server? Überhaupt die Script-Sachen: passiert das local oder "sieht" die JD-Firma, was ich hier treibe?
It uses local resources. You can verify this by blocking the internet connection to JD.
Reply With Quote
  #5  
Old 11.03.2021, 12:38
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 71,140
Default

Some more infor from developer Jiaz regarding this topic:
Weitere Infos zu diesem Thema vom Entwickler Jiaz:

Quote:
-> customproxylist will only be updated on shutdown and move/enable/disable of proxies in list
-> it's not a *live* view and primarily meant to be able to export/import settings for MyJDownloader or simple scripts

-> for the .0 on numbers, see stackoverflow.com/questions/16662031/json-stringify-conversion-of-float-to-intr normal numbers.

-> Gibt es eine blockierende Messagebox? Alert unterbricht wohl nicht.
-> no, because blocking dialog can cause deadlocks. dialog is waiting to be closed and blocking EDT/gui thread while other parts of JDownloader try to execute code on EDT and this leads to deadlock

-> Manchmal ist das Scriptsystem sogar völlig blockiert
-> sounds like typical deadlock. pay attention to synchronous execution flag on scripts. doing this on certain event types can easily lead to deadlocks. use synchronization within the script

-> Kann man das gesamte "Script-System" innerhalb JD reseten?
-> not required because each script is being executed within its own context, fresh created for each execution

-> callAPI
-> doesn't use network at all but just an internal wrapper to call api methods
-> also when using MyJDownloader api , because of end-to-end encryption in use, we can't see the data, just the commands(api method), also supports authentication
-> when using the 'deprecated' remoteapi(disabled by default, there is no encryption/authentication in place

-> proxy list managing is very limited via callapi and other methods because lots of internal stuff(eg ban lists, waiting/error states) are not accessible outside java
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 11:47.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.