JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 28.11.2019, 07:38
schwa226 schwa226 is offline
Junior Loader
 
Join Date: Nov 2019
Posts: 11
Question Direkt Gateway, VPN, Win10

Hallo,

ich habe PureVPN und bei Win10 eine PPTP VPN Verbindung eingerichtet. Wenn diese die Option "Standardgateway für das Remotenetzwerk"
geht alles über die VPN Verbindung und es funktioniert.

Nun möchte ich die Verbindung Splitten. D.h diese Option wird in der VPN Verbindung deaktiviert.

Somit läuft der ganze Internet Verkehr nicht über die VPN Verbindung.

Jetzt habe ich bei JD 2 einen Proxy mit "Direkt Gateway" mit diesen Adapter hinzugefügt.
Jetzt kommt immer die Meldung das kein Internet verfügbar ist.

Ist das ein JD 2 oder Windows Problem?
Reply With Quote
  #2  
Old 28.11.2019, 08:57
foxykent foxykent is offline
Modem User
 
Join Date: Nov 2019
Posts: 4
Default

english please...
Reply With Quote
  #3  
Old 28.11.2019, 12:36
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,195
Default

@foxykent
this parent thread permits english and german.
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #4  
Old 05.12.2019, 12:15
schwa226 schwa226 is offline
Junior Loader
 
Join Date: Nov 2019
Posts: 11
Default

I got somehow further with this VPN issue.
I added a new WAN Miniport and unchecked "Use standard gateway" in ip4 settings. Then I connect the VPN connection and add a route like this:
Code:
netsh interface ipv4 add route 0.0.0.0/0 "PureVPN"
Then the route table look like this:
Code:
Veröff.  Typ       Met   Präfix                    Idx  Gateway/Schnittstelle
-------  --------  ----  ------------------------  ---  ---------------------
Nein     Manuell   0    0.0.0.0/0                  11  192.168.1.1
Nein     Manuell   256  0.0.0.0/0                  24  PureVPN
Nein     Manuell   1    46.0.0.0/8                 24  46.243.221.4
Nein     Manuell   1    46.243.221.1/32            11  192.168.1.1
Nein     System    256  46.243.221.62/32           24  PureVPN
Nein     System    256  127.0.0.0/8                 1  Loopback Pseudo-Interface 1
Nein     System    256  127.0.0.1/32                1  Loopback Pseudo-Interface 1
Nein     System    256  127.255.255.255/32          1  Loopback Pseudo-Interface 1
Nein     System    256  192.168.1.0/24             11  Ethernet
Nein     System    256  192.168.1.238/32           11  Ethernet
Nein     System    256  192.168.1.255/32           11  Ethernet
Nein     System    256  224.0.0.0/4                 1  Loopback Pseudo-Interface 1
Nein     System    256  224.0.0.0/4                11  Ethernet
Nein     Manuell   1    224.0.0.0/4                24  PureVPN
Nein     System    256  255.255.255.255/32          1  Loopback Pseudo-Interface 1
Nein     System    256  255.255.255.255/32         11  Ethernet
Nein     System    256  255.255.255.255/32         24  PureVPN
When I now add the local IP of the WAN adapter in JD2->Settings->Connections as direct gateway
Code:
46.243.221.62
the download is starting and working.

Now I have the problem when the VPN disconnect/reconnect the IP is changing and I need to update the IP in JD2 settings.
Any idea how to fix this?

And where do I see my external IP when downloading with JD2?
Reply With Quote
  #5  
Old 06.12.2019, 12:00
schwa226 schwa226 is offline
Junior Loader
 
Join Date: Nov 2019
Posts: 11
Default

This patch will add the option to enter a network interface name for direct gateway:
Code:
Index: src/jd/http/Request.java
===================================================================
--- src/jd/http/Request.java	(revision 41595)
+++ src/jd/http/Request.java	(working copy)
@@ -21,11 +21,16 @@
 import java.io.InputStream;
 import java.net.MalformedURLException;
 import java.net.URL;
+import java.net.NetworkInterface;
+import java.net.InetAddress;
+import java.net.SocketException;
 import java.nio.charset.CharacterCodingException;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
 import java.util.regex.Pattern;
+import java.util.Enumeration;
+import java.util.Collections;
 
 import org.appwork.exceptions.ThrowUncheckedException;
 import org.appwork.exceptions.WTFException;
@@ -897,6 +902,29 @@
             this.proxy = proxy;
         } else {
             this.proxy = new ClonedProxy(proxy);
+            switch (this.proxy.getType()) {
+                case DIRECT:
+                Enumeration<NetworkInterface> nets = null;
+                try {
+                    nets = NetworkInterface.getNetworkInterfaces();
+                } catch (SocketException e) {
+                    // TODO Auto-generated catch block
+                    e.printStackTrace();
+                }
+
+                if (nets != null) {
+                    for (NetworkInterface netint : Collections.list(nets)) {
+                        if (StringUtils.equalsIgnoreCase(netint.getDisplayName(), this.proxy.getLocal())) {
+                            Enumeration<InetAddress> inetAddresses = netint.getInetAddresses();
+                            if (inetAddresses.hasMoreElements()) {
+                                this.proxy.setLocal(inetAddresses.nextElement().getHostAddress());
+                            }
+                            break;
+                        }
+                    }
+                    break;
+                }
+            }
         }
     }
Get the interface name by ipconfig/ifconfig and enter it as "Host/IP/Address". JDBrowser will search all adapter for a matching display name and use the IP for this direct proxy. This solve the issue of a dynamic IP on interfaces.
The patch is quick and dirty as I am not a Java programer
Reply With Quote
  #6  
Old 06.12.2019, 16:14
schwa226 schwa226 is offline
Junior Loader
 
Join Date: Nov 2019
Posts: 11
Default

Any description how I can build a JDownloader package for Windows?
I do not find the exe or jar file!?
Reply With Quote
  #7  
Old 07.12.2019, 00:36
thecoder2012's Avatar
thecoder2012 thecoder2012 is offline
Official 9kw.eu Support
 
Join Date: Feb 2013
Location: Internet
Posts: 1,279
Default

Good idea!

Quote:
Originally Posted by schwa226 View Post
Any description how I can build a JDownloader package for Windows?
Try directory "build" and "launch4j.xml" or "newBuild" => "build.xml"

Quote:
Originally Posted by schwa226 View Post
I do not find the exe or jar file!?
I think only jar file in this case.
__________________
Join 9kw.eu Captcha Service now and let your JD continue downloads while you sleep.

Last edited by thecoder2012; 07.12.2019 at 00:39.
Reply With Quote
  #8  
Old 07.12.2019, 01:22
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,195
Default

Hi
build/new/build.xml for memory is what you use, alter components via gui config editor if required.
please note that compiling your own version will have side effects, as components will be missing (close source, eg. updater)
also, exes are just loaders, you should be able to use existing ones.

not sure your approach is the correct one, but i'm sure Jiaz or Coalado will respond next week.
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #9  
Old 07.12.2019, 09:16
schwa226 schwa226 is offline
Junior Loader
 
Join Date: Nov 2019
Posts: 11
Default

Code:
Buildfile: C:\Users\PRIVAT\eclipse-workspace\JDownloader\build\newBuild\build.xml
clean:
   [delete] Deleting directory C:\Users\PRIVAT\eclipse-workspace\JDownloader\build\newBuild\update\bin
   [delete] Deleting directory C:\Users\PRIVAT\eclipse-workspace\JDownloader\build\newBuild\update\dist
    [mkdir] Created dir: C:\Users\PRIVAT\eclipse-workspace\JDownloader\build\newBuild\update\dist
compile:
    [mkdir] Created dir: C:\Users\PRIVAT\eclipse-workspace\JDownloader\build\newBuild\update\bin

BUILD FAILED
C:\Users\PRIVAT\eclipse-workspace\JDownloader\build\newBuild\build.xml:52: srcdir "C:\Users\PRIVAT\eclipse-workspace\JDownloader\build\AppWorkUtils\src" does not exist!
I have all 4 projects like the how-to shows in eclipse.
Reply With Quote
  #10  
Old 08.12.2019, 10:46
schwa226 schwa226 is offline
Junior Loader
 
Join Date: Nov 2019
Posts: 11
Default

I am still not able to compile a jar, can someone please compile it for me with the patch above! Thx!

Code:
Unknown argument: -XDignore.symbol.file=true
Buildfile: C:\Users\PRIVAT\eclipse-workspace\AppWorkUtils\build\build.xml

compile:
      [delete] Deleting directory C:\Users\PRIVAT\eclipse-workspace\AppWorkUtils\bin
       [mkdir] Created dir: C:\Users\PRIVAT\eclipse-workspace\AppWorkUtils\bin
       [javac] C:\Users\PRIVAT\eclipse-workspace\AppWorkUtils\build\build.xml:21: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
       [javac] Compiling 983 source files to C:\Users\PRIVAT\eclipse-workspace\AppWorkUtils\bin
       [javac] C:\Users\PRIVAT\eclipse-workspace\AppWorkUtils\src\org\appwork\swing\synthetica\SyntheticaHelper.java:189: error: package de.javasoft.plaf.synthetica does not exist
       [javac]             de.javasoft.plaf.synthetica.SyntheticaLookAndFeel.setWindowsDecorated(decorated);
       [javac]                                        ^
       [javac] C:\Users\PRIVAT\eclipse-workspace\AppWorkUtils\src\org\appwork\swing\synthetica\SyntheticaHelper.java:218: error: package de.javasoft.plaf.synthetica does not exist
       [javac]                 de.javasoft.plaf.synthetica.SyntheticaLookAndFeel.setLookAndFeel(laf);
       [javac]                                            ^
       [javac] C:\Users\PRIVAT\eclipse-workspace\AppWorkUtils\src\org\appwork\swing\synthetica\SyntheticaHelper.java:220: error: package de.javasoft.plaf.synthetica does not exist
       [javac]             de.javasoft.plaf.synthetica.SyntheticaLookAndFeel.setExtendedFileChooserEnabled(false);
       [javac]                                        ^
       [javac] C:\Users\PRIVAT\eclipse-workspace\AppWorkUtils\src\org\appwork\swing\synthetica\SyntheticaHelper.java:222: error: package de.javasoft.plaf.synthetica does not exist
       [javac]             int fontSize = de.javasoft.plaf.synthetica.SyntheticaLookAndFeel.getFont().getSize();
       [javac]                                                       ^
       [javac] C:\Users\PRIVAT\eclipse-workspace\AppWorkUtils\src\org\appwork\swing\synthetica\SyntheticaHelper.java:229: error: package de.javasoft.plaf.synthetica does not exist
       [javac]                 final int oldStyle = de.javasoft.plaf.synthetica.SyntheticaLookAndFeel.getFont().getStyle();
       [javac]                                                                 ^
       [javac] C:\Users\PRIVAT\eclipse-workspace\AppWorkUtils\src\org\appwork\swing\synthetica\SyntheticaHelper.java:231: error: package de.javasoft.plaf.synthetica does not exist
       [javac]                 de.javasoft.plaf.synthetica.SyntheticaLookAndFeel.setFont(newFont, false);
       [javac]                                            ^
       [javac] C:\Users\PRIVAT\eclipse-workspace\AppWorkUtils\src\org\appwork\utils\swing\dialog\InternDialog.java:85: error: package com.apple.eawt does not exist
       [javac]             final com.apple.eawt.Application application = com.apple.eawt.Application.getApplication();
       [javac]                                 ^
       [javac] C:\Users\PRIVAT\eclipse-workspace\AppWorkUtils\src\org\appwork\utils\swing\dialog\InternDialog.java:85: error: package com.apple.eawt does not exist
       [javac]             final com.apple.eawt.Application application = com.apple.eawt.Application.getApplication();
       [javac]                                                                          ^
       [javac] C:\Users\PRIVAT\eclipse-workspace\AppWorkUtils\src\org\appwork\utils\swing\windowmanager\MacWindowManager.java:97: error: package com.apple.eawt does not exist
       [javac]             final com.apple.eawt.Application application = com.apple.eawt.Application.getApplication();
       [javac]                                 ^
       [javac] C:\Users\PRIVAT\eclipse-workspace\AppWorkUtils\src\org\appwork\utils\swing\windowmanager\MacWindowManager.java:97: error: package com.apple.eawt does not exist
       [javac]             final com.apple.eawt.Application application = com.apple.eawt.Application.getApplication();
       [javac]                                                                          ^
       [javac] Note: Some input files use or override a deprecated API.
       [javac] Note: Recompile with -Xlint:deprecation for details.
       [javac] Note: Some input files use unchecked or unsafe operations.
       [javac] Note: Recompile with -Xlint:unchecked for details.
       [javac] 10 errors

BUILD FAILED
C:\Users\PRIVAT\eclipse-workspace\AppWorkUtils\build\build.xml:21: Compile failed; see the compiler error output for details.

Total time: 10 seconds
Code:
eclipse.buildId=4.13.0.I20190916-1045
java.version=1.8.0_231
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_AT
Framework arguments:  -product org.eclipse.epp.package.java.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product
Reply With Quote
  #11  
Old 09.12.2019, 11:28
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,195
Default

Quote:
Originally Posted by schwa226 View Post
Code:
BUILD FAILED
C:\Users\PRIVAT\eclipse-workspace\JDownloader\build\newBuild\build.xml:52: srcdir "C:\Users\PRIVAT\eclipse-workspace\JDownloader\build\AppWorkUtils\src" does not exist!
I have all 4 projects like the how-to shows in eclipse.
did you configure the xml with ... function?
for memory you need to remove uncheck the 'all', and change to without sign

does the location paths the same? source ../AppWorkUtils

raztoki
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #12  
Old 09.12.2019, 12:34
schwa226 schwa226 is offline
Junior Loader
 
Join Date: Nov 2019
Posts: 11
Default

I changed the build target to "withoutsign" and added the project path.

If I now remove some dependencies it compiles in build.xml:
Code:
<property name="dep.jdc" value="../JDClosed" />
<property name="dep.serveroptions" value="../JDownloaderServerOptions" />
<property name="dep.updateclient" value="../UpdateClientV2" />
<property name="dep.jdupdateclient" value="../JDownloaderUpdater" />
But when I now replace the JDownloader.jar in my installed version I get this error and start the JDownloader.exe:
Code:
java.lang.ClassNotFoundException: org.jdownloader.update.launcher.JDLauncher
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:81)
	at com.exe4j.runtime.WinLauncher.main(WinLauncher.java:94)
	at com.install4j.runtime.launcher.WinLauncher.main(WinLauncher.java:25)
How you build this setup/JDownloader.jar?
Is it so hard? I try now for 3 days to get a JDownloader.jar.

Last edited by schwa226; 09.12.2019 at 12:59.
Reply With Quote
  #13  
Old 09.12.2019, 15:11
schwa226 schwa226 is offline
Junior Loader
 
Join Date: Nov 2019
Posts: 11
Default

Code:
Buildfile: C:\Users\PRIVAT\eclipse-workspace\JDownloader\build\newBuild\build.xml
clean:
    [mkdir] Created dir: C:\Users\PRIVAT\eclipse-workspace\JDownloader\update\dist
compile:
    [mkdir] Created dir: C:\Users\PRIVAT\eclipse-workspace\JDownloader\update\bin
    [javac] Compiling 983 source files to C:\Users\PRIVAT\eclipse-workspace\JDownloader\update\bin

BUILD FAILED
C:\Users\PRIVAT\eclipse-workspace\JDownloader\build\newBuild\build.xml:52: C:\Users\PRIVAT\eclipse-workspace\JDClosed\libs does not exist.
This happen with not modified build.xml, so how to build it?
Reply With Quote
  #14  
Old 10.12.2019, 08:46
schwa226 schwa226 is offline
Junior Loader
 
Join Date: Nov 2019
Posts: 11
Angry

I am running crazy! What software is this if nobody is able to compile it!?

This is now my build.xml:
Spoiler:
<project default="all" basedir=".">
<!-- Dependencies -->
<property name="dep.awu" value="../AppWorkUtils" />
<property name="dep.browser" value="../JDBrowser" />
<property name="dep.myjd" value="../MyJDownloaderClient" />
<property name="debug" value="true" />



<property name="working" value="update" />

<property name="cls" value="${working}/bin" />
<property name="dist" value="${working}/dist" />
<property name="res" value="ressourcen" />
<property name="pluginres" value="${dist}/pluginressourcen" />



<path id="classpath">
<fileset dir="${cls}" />
<!-- Dependencies -->
<fileset dir="${dep.awu}/libs" includes="**/*.jar" />
<fileset dir="${dep.browser}/libs" includes="**/*.jar" />

<fileset dir="${res}/libs" includes="**/*.jar" />
<fileset dir="${res}/libs_ext" includes="**/*.jar" />
</path>

<!-- Deletes the old build -->
<target name="clean">

<delete dir="${working}/bin" />
<delete dir="${dist}" />
<mkdir dir="${dist}" />
<mkdir dir="${working}" />
</target>

<!-- Compiles the code -->
<target name="compile" depends="clean">
<mkdir dir="${cls}" />



<!-- Build dependencies -->

<javac srcdir="${dep.awu}/src" excludes="**/test/**" verbose="false" debug="${debug}" destdir="${cls}" encoding="UTF-8" source="1.6" target="1.6" includeantruntime="false">
<classpath refid="classpath" />

</javac>

<javac srcdir="${dep.myjd}/src" excludes="**/test/**" verbose="false" debug="${debug}" destdir="${cls}" encoding="UTF-8" source="1.6" target="1.6" includeantruntime="false">
<classpath refid="classpath" />

</javac>

<javac srcdir="${dep.browser}/src" excludes="" debug="${debug}" verbose="false" destdir="${cls}" encoding="UTF-8" source="1.6" target="1.6" includeantruntime="false">
<classpath refid="classpath" />

</javac>



<javac srcdir="src" debug="${debug}" verbose="false" excludes="jd/utils/dev/*,org/jdownloader/extensions/langfileeditor/**/*,org/jdownloader/extensions/remoteserv/**/*" destdir="${cls}" encoding="UTF-8" source="1.6" target="1.6" includeantruntime="false">
<classpath refid="classpath" />
<compilerarg line="-proc:none" />

</javac>

<echo message="Finished." />





</target>



<!-- Copies all the additional ressources -->
<target name="copy_res" depends="clean">
<copy todir="${dist}/jd">
<fileset dir="${res}/jd" includes="**/*" />
</copy>

<copy todir="${dist}/libs">
<fileset dir="${res}/libs" includes="**/*">
<exclude name="**/*.info" />
</fileset>
</copy>
<copy todir="${dist}/libs">
<fileset dir="${dep.awu}/libs" includes="**/*.jar">
<exclude name="miglayout.jar" />
<exclude name="**/*.info" />
</fileset>
</copy>
<copy todir="${dist}/libs">
<fileset dir="${dep.browser}/libs" includes="**/*.jar">
<exclude name="**/*.info" />
</fileset>
</copy>

<copy todir="${dist}">
<fileset dir="themes" includes="**/*">
<exclude name="**/*.psd" />
<exclude name="**/*.pnd" />
</fileset>

</copy>

<copy todir="${dist}/licenses">
<fileset dir="${res}/licenses" includes="**/*" />
<fileset dir="${res}/libs/" includes="**/*.info" />
<fileset dir="${dep.awu}/libs/" includes="**/*.info" />
<fileset dir="${dep.browser}/libs/" includes="**/*.info" />
</copy>

<copy todir="${dist}/tools">
<fileset dir="${res}/tools" includes="**/*" />
</copy>
<copy todir="${dist}">
<fileset dir="${res}" includes="*.html, *.txt, *.exe, *.bat, *.properties" />
</copy>

<mkdir dir="${dist}/java" />
<mkdir dir="${dist}/tmp" />



<mkdir dir="${dist}/translations" />

<copy todir="${dist}/translations">
<fileset dir="${dep.awu}/src" includes="**/*.lng" />
<fileset dir="${dep.browser}/src" includes="**/*.lng" />
<fileset dir="src" includes="**/*.lng" />
</copy>
<copy todir="${dist}">

<fileset dir="translations" includes="**/*.lng" />

</copy>

</target>

<!-- Make the default jar -->
<target name="jarMain">
<mkdir dir="${dist}/libs" />
<manifest file="${dist}/Manifest.MF">
<attribute name="Created-By" value="JD-Team and AppWork GmbH" />
</manifest>
<jar duplicate="fail" file="${dist}/libs/JDHttp.jar" manifest="${dist}/Manifest.MF">


<fileset dir="${cls}">
<include name="jd/http/**/*" />
</fileset>
</jar>
<jar duplicate="fail" file="${dist}/libs/JDGUI.jar" manifest="${dist}/Manifest.MF">

<fileset dir="${cls}">
<include name="jd/gui/**" />
</fileset>
</jar>
<jar duplicate="fail" file="${dist}/libs/JAntiCaptcha.jar" manifest="${dist}/Manifest.MF">

<fileset dir="${cls}">
<include name="jd/captcha/**" />
<exclude name="jd/captcha/methods/**" />
</fileset>
</jar>
<jar duplicate="fail" file="${dist}/libs/JDUtils.jar" manifest="${dist}/Manifest.MF">

<fileset dir="${cls}">
<include name="jd/nutils/**" />
</fileset>
</jar>

<jar duplicate="fail" file="${dist}/libs/Dynamics.jar" manifest="${dist}/Manifest.MF">

<fileset dir="${cls}">
<include name="org/jdownloader/dynamic/**/*" />
</fileset>
</jar>

<jar duplicate="fail" file="${dist}/libs/cons.jar" manifest="${dist}/Manifest.MF">
<fileset dir="${cls}">
<include name="org/jdownloader/container/**/*" />
</fileset>
</jar>

<!--laf-->

<jar duplicate="fail" file="${dist}/libs/laf/syntheticaJDCustom.jar" manifest="${dist}/Manifest.MF">

<fileset dir="${cls}">

<include name="org/jdownloader/gui/laf/**/*" />
<exclude name="org/jdownloader/gui/laf/plain/**/*" />
</fileset>

<fileset dir="src">

<include name="org/jdownloader/gui/laf/**/*" />
<exclude name="org/jdownloader/gui/laf/plain/**/*" />
<exclude name="**/*.java" />
</fileset>

</jar>

<jar duplicate="fail" file="${dist}/libs/laf/syntheticaJDPlain.jar" manifest="${dist}/Manifest.MF">

<fileset dir="${cls}">


<include name="org/jdownloader/gui/laf/plain/**/*" />
</fileset>

<fileset dir="src">

<include name="org/jdownloader/gui/laf/plain/**/*" />
<exclude name="**/*.java" />
</fileset>

</jar>



<delete file="${dist}/Manifest.MF" failonerror="true" />
<pathconvert pathsep=" " dirsep="/" property="class-path">
<path>
<fileset dir="${dist}/libs" includes="**/*.jar" />
</path>
<mapper type="regexp" from="[\\/]dist[\\/](libs[\\/].*)" to="\1" />

</pathconvert>
<pathconvert pathsep=" " dirsep="/" property="class-path-extensions">
<path>
<fileset dir="${dist}/extensions" includes="**/*.jar" />
</path>
<mapper type="regexp" from="[\\/]dist[\\/](extensions[\\/].*)" to="\1" />
</pathconvert>
<echo message="ClassPath ${class-path} ${class-path-extensions}" />
<manifest file="${dist}/Manifest.MF">
<attribute name="Created-By" value="JD-Team and AppWork GmbH" />
<attribute name="Main-Class" value="jd.Main" />
<!-- plugins that serialize own classes have to be put in the classpath -->
<!-- <attribute name="Class-Path" value="JDownloader.jar ${class-path} ${class-path-extensions}" /> -->

</manifest>
<!--CORE-->

<jar duplicate="fail" file="${dist}/Core.jar" manifest="${dist}/Manifest.MF">

<fileset dir="${cls}">
<include name="**/*.class" />
<include name="**/*.txt" />
<include name="**/*.dat" />

<exclude name="jd/controlling/reconnect/plugins/*/**/*" />
<exclude name="jd/captcha/**" />
<exclude name="org/appwork/**/*" />
<exclude name="org/jdownloader/gui/laf/**/*" />
<exclude name="org/jdownloader/update/**/*" />
<exclude name="org/jdownloader/uninstaller/**/*" />
<exclude name="org/jdownloader/installer/**/*" />
<exclude name="org/jdownloader/dynamic/**/*" />
<exclude name="jd/dynamics/**" />
<exclude name="jd/gui/**" />
<exclude name="com/fastcgi/**" />
<exclude name="org/jdownloader/container/**/*" />
<exclude name="org/jdownloader/updatev2/**/*" />

<exclude name="jd/http/**" />
<exclude name="jd/nutils/**" />
<exclude name="jd/plugins/hoster/**" />
<include name="jd/plugins/hoster/RTMPDownload.class" />
<exclude name="jd/plugins/decrypter/**" />
<exclude name="org/jdownloader/extensions/*/**/*" />
<exclude name="jd/utils/dev/**" />
<exclude name="tests/**" />
<exclude name="**/test/**" />
</fileset>
<fileset dir="src">
<include name="**/*.js" />
<include name="**/*.html" />
<include name="**/*.css" />
<include name="org/jdownloader/captcha/v2/challenge/recaptcha/v2/example/*.jpg" />
<include name="org/jdownloader/captcha/v2/solver/browser/html/**/*" />

</fileset>

<fileset dir="${cls}">
<include name="jd/plugins/hoster/RTMPDownload.class" />
</fileset>

<fileset dir="${res}">
<include name="*.properties" />
<exclude name="jd/captcha/methods" />
</fileset>
</jar>
<delete file="${dist}/Manifest.MF" failonerror="true" />
<delete file="${working}/version.nfo" failonerror="true" />
<echo file="${working}/version.nfo">${updateclient.revision}</echo>

<pathconvert pathsep="${line.separator}" dirsep="/" property="cp">
<path>
<fileset dir="${dist}/libs" includes="**/*.jar" />
</path>
<mapper type="regexp" from="[\\/]dist[\\/](libs[\\/].*)" to="\1" />

</pathconvert>
<pathconvert pathsep="${line.separator}" dirsep="/" property="cpe">
<path>
<fileset dir="${dist}/extensions" includes="**/*.jar" />
</path>
<mapper type="regexp" from="[\\/]dist[\\/](extensions[\\/].*)" to="\1" />
</pathconvert>

<delete file="${working}/classpath" failonerror="true" />
<echo file="${working}/classpath">Core.jar${line.separator}${cp}${line.separator}${cpe}</echo>
<!--launcher-->
<manifest file="${dist}/Manifest.MF">
<attribute name="Created-By" value="AppWork GmbH" />
<attribute name="Main-Class" value="jd.Main" />
<!-- plugins that serialize own classes have to be put in the classpath -->
<!--<attribute name="Class-Path" value="" />-->

</manifest>
<jar duplicate="fail" file="${dist}/JDownloader.jar" manifest="${dist}/Manifest.MF">
<zipfileset src="${dep.awu}/libs/miglayout.jar" excludes="META-INF/*" />
<zipfileset src="${dep.awu}/libs/proxyVole.jar" excludes="META-INF/*" />
<fileset dir="${working}">
<include name="version.nfo" />
<include name="classpath" />
</fileset>
<fileset dir="${cls}">
<include name="classpath" />
<include name="jd/Main.class" />
<include name="org/jdownloader/logging/**/*" />
<include name="org/jdownloader/updatev2/**/*" />
<include name="org/jdownloader/update/**/*.class" />
<include name="org/jdownloader/uninstaller/**/*.class" />
<include name="org/jdownloader/installer/**/*.class" />

<include name="org/appwork/**/*" />
<exclude name="org/appwork/update/server/**/*" />
<exclude name="org/appwork/utils/sms/**/*" />
<exclude name="org/appwork/utils/ide/**/*" />
</fileset>

<fileset dir="${dep.awu}/src">
<include name="org/appwork/utils/net/effective_tld_names.dat" />
<include name="org/appwork/remoteapi/html/*.css" />
<include name="org/appwork/remoteapi/html/*.js" />
<include name="org/appwork/remoteapi/html/*.html" />

</fileset>


<fileset dir="themes">
<include name="themes/standard/**/images/dialog/**/*" />
<include name="themes/standard/**/images/update*" />
<exclude name="**/*.psd" />
<exclude name="**/*.pnd" />
</fileset>
</jar>
<delete file="${dist}/Manifest.MF" failonerror="true" />

</target>



<!-- Copies compiled classes(hoster, decrypter, dynamics -->
<target name="copy_compiled">
<mkdir dir="${dist}/jd/plugins/hoster/" />
<copy todir="${dist}/jd/plugins/hoster/">
<fileset dir="${cls}/jd/plugins/hoster/">
<include name="**/*" />
<exclude name="RTMPDownload*" />
</fileset>
</copy>
<mkdir dir="${dist}/jd/plugins/decrypter/" />
<copy todir="${dist}/jd/plugins/decrypter/">
<fileset dir="${cls}/jd/plugins/decrypter/">
<include name="**/*" />
</fileset>
</copy>

</target>

<!-- Use this to build an addon -->
<macrodef name="buildAddon" description="Function for creating an optional addon">

<attribute name="package" />
<attribute name="include" />
<sequential>
<echo message="Creating @{package}" />
<mkdir dir="${dist}/extensions" />

<jar duplicate="fail" jarfile="${dist}/extensions/@{package}.jar" manifest="${dist}/Manifest.MF">
<fileset dir="${cls}">
<include name="org/jdownloader/extensions/@{include}/**/*" />
</fileset>
<fileset dir="src">
<include name="org/jdownloader/extensions/@{include}/**/*" />
<exclude name="**/*.java" />
</fileset>
</jar>
</sequential>
</macrodef>

<!-- Build optional addon plugins -->
<target name="jarOptionals" description="Creates the Optional Plugins">
<manifest file="${dist}/Manifest.MF">
<attribute name="Created-By" value="JD-Team and Friends" />
</manifest>

<buildAddon package="EventScripter" include="eventscripter" />
<buildAddon package="JDChat" include="chat" />
<buildAddon package="infobar" include="infobar" />
<buildAddon package="FolderWatch" include="folderwatchV2" />
<buildAddon package="infobar" include="infobar" />

<buildAddon package="JDShutdown" include="shutdown" />



<buildAddon package="JDGrowl" include="growl" />
<buildAddon package="AntiShutdown" include="antistandby" />
<buildAddon package="Extraction" include="extraction" />
<buildAddon package="Scheduler" include="schedulerV2" />



<buildAddon package="translator" include="translator" />
<delete file="${dist}/Manifest.MF" failonerror="true" />
</target>

<!-- Use this to build an reconnect plugin -->
<macrodef name="buildRecPlugin" description="Function for creating an optional router addon">
<attribute name="name" />

<sequential>
<echo message="Creating @{name}" />
<mkdir dir="${dist}/reconnect/" />
<jar duplicate="fail" jarfile="${dist}/reconnect/@{name}.reconnect" manifest="${dist}/Manifest.MF">
<fileset dir="${cls}">
<include name="jd/controlling/reconnect/plugins/@{name}/**" />
</fileset>
</jar>
</sequential>
</macrodef>

<!-- Build optional reconnect plugins -->
<target name="jarReconnectOptionals" depends="compile" description="Creates the Optional Reconnect Addons">
<manifest file="${dist}/Manifest.MF">
<attribute name="Created-By" value="JD-Team" />
</manifest>



<delete file="${dist}/Manifest.MF" failonerror="true" />
</target>




<target name="update">
<delete dir="${update_1}" />
<mkdir dir="${update_1}" />
<delete dir="${update_2}" />
<mkdir dir="${update_2}" />
<copy todir="${update_1}" overwrite="true">
<fileset dir="${dist}" includes="JDownloader.jar" />
</copy>
<copy todir="${update_2}" overwrite="true">
<fileset dir="${dist}">
<exclude name="JDownloader.jar" />
</fileset>
</copy>

</target>



<!-- Signs the jars -->
<target name="sign">
<signjar keystore="${appwork_java_cert}" alias="${appwork_java_cert_alias}" storepass="${appwork_java_cert_pass}">
<path>
<fileset dir="${dist}" includes="**/*.jar" />
</path>
</signjar>
</target>

<target name="all" depends="clean,compile,copy_res,jarMain,copy_compiled,jarReconnectOptionals,jarOptionals,sign">
<echo message="Finished." />
</target>
<target name="withoutsign" depends="clean,compile,copy_res,jarReconnectOptionals,jarOptionals,jarMain,copy_compiled">
<echo message="Finished." />
</target>
<target name="updater" depends="clean,compile,copy_compiled">
<echo message="Finished." />
</target>
</project>

It's building but not starting:
Code:
java.lang.ClassNotFoundException: org.jdownloader.update.launcher.JDLauncher
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:81)
	at com.exe4j.runtime.WinLauncher.main(WinLauncher.java:94)
	at com.install4j.runtime.launcher.WinLauncher.main(WinLauncher.java:25)
So nobody have a solution how I can make a standalone build with my patch above!?
Reply With Quote
  #15  
Old 10.12.2019, 10:03
thecoder2012's Avatar
thecoder2012 thecoder2012 is offline
Official 9kw.eu Support
 
Join Date: Feb 2013
Location: Internet
Posts: 1,279
Default

Quote:
Originally Posted by raztoki View Post
did you configure the xml with ... function?
for memory you need to remove uncheck the 'all', and change to without sign
You mean "withoutsign" in the first line in build.xml? (default "all")
Example <project default="withoutsign" basedir=".">

And I think a new example like "build-svn.xml" is helpful for the future.

Quote:
Originally Posted by schwa226 View Post
I am running crazy! What software is this if nobody is able to compile it!?
All accepted changes are in the official builds.

Quote:
Originally Posted by schwa226 View Post
Code:
java.lang.ClassNotFoundException: org.jdownloader.update.launcher.JDLauncher
Delete the updater in this source code (or start function) if this is your problem.

Quote:
Originally Posted by schwa226 View Post
So nobody have a solution how I can make a standalone build with my patch above!?
It's more the time than the knowledge.
And not all elements are open source (e.g. updater, closed source things) in this case.
__________________
Join 9kw.eu Captcha Service now and let your JD continue downloads while you sleep.

Last edited by thecoder2012; 02.01.2020 at 01:12.
Reply With Quote
  #16  
Old 10.12.2019, 12:50
schwa226 schwa226 is offline
Junior Loader
 
Join Date: Nov 2019
Posts: 11
Default

Anyway, I just copied-pasted the single file JDHttp.jar to the JD2 installation and it is working now. Maybe the devs want to take the patch above to the SVN!?
Reply With Quote
  #17  
Old 08.03.2020, 09:35
schwa226 schwa226 is offline
Junior Loader
 
Join Date: Nov 2019
Posts: 11
Default

@Think3r, @pspzockerscene, @coalado

Any chance to get this patch upstream in JDownloader?
It's still working fine here with interface name!

Quote:
Originally Posted by schwa226 View Post
This patch will add the option to enter a network interface name for direct gateway:
Code:
Index: src/jd/http/Request.java
===================================================================
--- src/jd/http/Request.java	(revision 41595)
+++ src/jd/http/Request.java	(working copy)
@@ -21,11 +21,16 @@
 import java.io.InputStream;
 import java.net.MalformedURLException;
 import java.net.URL;
+import java.net.NetworkInterface;
+import java.net.InetAddress;
+import java.net.SocketException;
 import java.nio.charset.CharacterCodingException;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
 import java.util.regex.Pattern;
+import java.util.Enumeration;
+import java.util.Collections;
 
 import org.appwork.exceptions.ThrowUncheckedException;
 import org.appwork.exceptions.WTFException;
@@ -897,6 +902,29 @@
             this.proxy = proxy;
         } else {
             this.proxy = new ClonedProxy(proxy);
+            switch (this.proxy.getType()) {
+                case DIRECT:
+                Enumeration<NetworkInterface> nets = null;
+                try {
+                    nets = NetworkInterface.getNetworkInterfaces();
+                } catch (SocketException e) {
+                    // TODO Auto-generated catch block
+                    e.printStackTrace();
+                }
+
+                if (nets != null) {
+                    for (NetworkInterface netint : Collections.list(nets)) {
+                        if (StringUtils.equalsIgnoreCase(netint.getDisplayName(), this.proxy.getLocal())) {
+                            Enumeration<InetAddress> inetAddresses = netint.getInetAddresses();
+                            if (inetAddresses.hasMoreElements()) {
+                                this.proxy.setLocal(inetAddresses.nextElement().getHostAddress());
+                            }
+                            break;
+                        }
+                    }
+                    break;
+                }
+            }
         }
     }
Get the interface name by ipconfig/ifconfig and enter it as "Host/IP/Address". JDBrowser will search all adapter for a matching display name and use the IP for this direct proxy. This solve the issue of a dynamic IP on interfaces.
The patch is quick and dirty as I am not a Java programer
Reply With Quote
  #18  
Old 09.03.2020, 15:29
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 54,345
Default

Jiaz will check it.

Ticket:


-psp-
__________________
JD Supporter, Plugin Dev. & Community Manager
How to create a log || Wie man einen Log erstellt
Captcha FAQ EN || Captcha FAQ DE || 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?
That's true James
Quote:
Originally Posted by James
Die Leute verstehen einfach nicht dass nur weil man mit einer Waffe auch auf Menschen schießen kann dass ein Schützenver​ein kein Ort für Amoklaufide​en ist
Reply With Quote
  #19  
Old 09.03.2020, 19:19
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 54,345
Default

So here a translated answer of Jiaz:
- This should already work out of the box for a long time
- You might have simply entered a wrong name
- Which name did you enter?

I can see all interfaces in the dropdown menu without any issues.

-psp-
__________________
JD Supporter, Plugin Dev. & Community Manager
How to create a log || Wie man einen Log erstellt
Captcha FAQ EN || Captcha FAQ DE || 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?
That's true James
Quote:
Originally Posted by James
Die Leute verstehen einfach nicht dass nur weil man mit einer Waffe auch auf Menschen schießen kann dass ein Schützenver​ein kein Ort für Amoklaufide​en ist
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 03:55.
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 - 2020, Jelsoft Enterprises Ltd.