Skip to content

Commit

Permalink
2.65
Browse files Browse the repository at this point in the history
  • Loading branch information
tonikelope committed Jan 1, 2018
1 parent cb242c1 commit db05ac4
Show file tree
Hide file tree
Showing 24 changed files with 203 additions and 82 deletions.
9 changes: 2 additions & 7 deletions src/megabasterd/ChunkDownloader.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,10 @@ public void run() {

while (!_exit && !_download.isStopped()) {

if (_download.getMain_panel().isUse_smart_proxy() && _download.getMain_panel().getProxy_manager().isEnabled() && !_download.getMain_panel().isUse_smart_proxy()) {

_download.getMain_panel().getProxy_manager().setUse_smart_proxy(false);
}

if (httpclient == null || error || _download.getMain_panel().isUse_smart_proxy()) {

if (error509 && _download.getMain_panel().isUse_smart_proxy() && !_download.getMain_panel().getProxy_manager().isEnabled()) {
_download.getMain_panel().getProxy_manager().setUse_smart_proxy(true);
_download.getMain_panel().getProxy_manager().setEnabled(true);
}

if (_download.getMain_panel().isUse_smart_proxy() && _download.getMain_panel().getProxy_manager().isEnabled() && !MainPanel.isUse_proxy()) {
Expand Down Expand Up @@ -147,7 +142,7 @@ public void run() {
} else {

httpclient = MiscTools.getApacheKissHttpClient();
_download.getMain_panel().getProxy_manager().setUse_smart_proxy(false);
_download.getMain_panel().getProxy_manager().setEnabled(false);
}

} else if (httpclient == null) {
Expand Down
5 changes: 0 additions & 5 deletions src/megabasterd/ChunkUploaderMono.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package megabasterd;

import java.io.ByteArrayOutputStream;
Expand Down
4 changes: 4 additions & 0 deletions src/megabasterd/ChunkWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
import javax.crypto.NoSuchPaddingException;
import static megabasterd.CryptTools.*;

/**
*
* @author tonikelope
*/
public final class ChunkWriter implements Runnable, SecureSingleThreadNotifiable {

private long _last_chunk_id_written;
Expand Down
4 changes: 4 additions & 0 deletions src/megabasterd/ClipboardSpy.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
import static java.util.logging.Level.SEVERE;
import java.util.logging.Logger;

/**
*
* @author tonikelope
*/
public final class ClipboardSpy implements Runnable, ClipboardOwner, SecureSingleThreadNotifiable, ClipboardChangeObservable {

private static final int SLEEP = 250;
Expand Down
4 changes: 4 additions & 0 deletions src/megabasterd/ContentType.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

import java.util.HashMap;

/**
*
* @author tonikelope
*/
public final class ContentType {

private final HashMap<String, String> _content_type;
Expand Down
4 changes: 4 additions & 0 deletions src/megabasterd/ContextMenuMouseListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
import javax.swing.JPopupMenu;
import javax.swing.text.JTextComponent;

/**
*
* @author tonikelope
*/
public final class ContextMenuMouseListener extends MouseAdapter {

private final JPopupMenu _popup;
Expand Down
4 changes: 4 additions & 0 deletions src/megabasterd/CryptTools.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@
import org.apache.http.message.BasicNameValuePair;
import org.codehaus.jackson.map.ObjectMapper;

/**
*
* @author tonikelope
*/
public final class CryptTools {

public static final int[] AES_ZERO_IV_I32A = {0, 0, 0, 0};
Expand Down
4 changes: 4 additions & 0 deletions src/megabasterd/DownloadManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
import static megabasterd.DBTools.*;
import static megabasterd.MainPanel.*;

/**
*
* @author tonikelope
*/
public final class DownloadManager extends TransferenceManager {

public DownloadManager(MainPanel main_panel) {
Expand Down
4 changes: 4 additions & 0 deletions src/megabasterd/DownloadView.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
import static megabasterd.MainPanel.*;
import static megabasterd.MiscTools.*;

/**
*
* @author tonikelope
*/
public final class DownloadView extends javax.swing.JPanel implements TransferenceView {

private final Download _download;
Expand Down
4 changes: 4 additions & 0 deletions src/megabasterd/GlobalSpeedMeter.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
import javax.swing.JLabel;
import static megabasterd.MiscTools.*;

/**
*
* @author tonikelope
*/
public final class GlobalSpeedMeter implements Runnable {

public static final int SLEEP = 3000;
Expand Down
35 changes: 12 additions & 23 deletions src/megabasterd/KissVideoStreamServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import com.sun.net.httpserver.HttpExchange;
import com.sun.net.httpserver.HttpHandler;
import com.sun.net.httpserver.HttpServer;
import java.awt.Color;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
Expand All @@ -30,6 +29,10 @@
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;

/**
*
* @author tonikelope
*/
public final class KissVideoStreamServer implements HttpHandler, SecureSingleThreadNotifiable {

public static final int THREAD_START = 0x01;
Expand Down Expand Up @@ -98,15 +101,7 @@ public void secureWait() {

public void start(int port, String context) throws IOException {

swingInvoke(
new Runnable() {
@Override
public void run() {
_main_panel.getView().getKiss_server_status().setForeground(new Color(0, 128, 0));

_main_panel.getView().getKiss_server_status().setText("Stream server running on localhost:" + STREAMER_PORT + " (Waiting for request...)");
}
});
_main_panel.getView().updateKissStreamServerStatus("Stream server running on port: " + STREAMER_PORT);

HttpServer httpserver = HttpServer.create(new InetSocketAddress(InetAddress.getLoopbackAddress(), port), 0);

Expand All @@ -130,24 +125,18 @@ private void _updateStatus(Integer status) {

private void _updateStatusView() {

swingInvoke(
new Runnable() {
@Override
public void run() {
String status;
String status;

if (getWorking_threads().size() > 0) {
if (getWorking_threads().size() > 0) {

status = "Stream server running on localhost:" + STREAMER_PORT + " Connections: " + getWorking_threads().size();
status = "Stream server running on port: " + STREAMER_PORT + " (" + getWorking_threads().size() + ")";

} else {
} else {

status = "Stream server running on localhost:" + STREAMER_PORT + " (Waiting for request...)";
}
status = "Stream server running on port: " + STREAMER_PORT;
}

_main_panel.getView().getKiss_server_status().setText(status);
}
});
_main_panel.getView().updateKissStreamServerStatus(status);

}

Expand Down
4 changes: 4 additions & 0 deletions src/megabasterd/LinkGrabberDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
import static megabasterd.MainPanel.*;
import static megabasterd.MiscTools.*;

/**
*
* @author tonikelope
*/
public final class LinkGrabberDialog extends javax.swing.JDialog implements ClipboardChangeObserver {

private boolean _download;
Expand Down
10 changes: 7 additions & 3 deletions src/megabasterd/MainPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import static javax.swing.JOptionPane.QUESTION_MESSAGE;
import static javax.swing.JOptionPane.YES_NO_CANCEL_OPTION;
import static javax.swing.JOptionPane.showOptionDialog;
import javax.swing.UIManager;
import static megabasterd.DBTools.*;
import static megabasterd.MiscTools.*;
import static megabasterd.Transference.*;
Expand All @@ -46,7 +47,7 @@
*/
public final class MainPanel {

public static final String VERSION = "2.64";
public static final String VERSION = "2.65";
public static final int THROTTLE_SLICE_SIZE = 16 * 1024;
public static final int DEFAULT_BYTE_BUFFER_SIZE = 16 * 1024;
public static final int STREAMER_PORT = 1337;
Expand All @@ -66,6 +67,9 @@ public static void main(String args[]) {

setNimbusLookAndFeel();

UIManager.put("OptionPane.messageFont", DEFAULT_FONT.deriveFont(15f * ZOOM_FACTOR));
UIManager.put("OptionPane.buttonFont", DEFAULT_FONT.deriveFont(13f * ZOOM_FACTOR));

if (args.length > 0) {

try {
Expand Down Expand Up @@ -193,8 +197,8 @@ public void run() {
});

if (_megacrypter_reverse) {
_mega_proxy_server = new MegaProxyServer(UUID.randomUUID().toString(), _megacrypter_reverse_port);
_mega_proxy_server.start();
_mega_proxy_server = new MegaProxyServer(this, UUID.randomUUID().toString(), _megacrypter_reverse_port);
THREAD_POOL.execute(_mega_proxy_server);
} else {
_mega_proxy_server = null;
}
Expand Down
34 changes: 30 additions & 4 deletions src/megabasterd/MainPanelView.form
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@
<Group type="102" attributes="0">
<Component id="kiss_server_status" max="32767" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="mc_reverse_status" max="32767" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="smart_proxy_status" max="32767" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="logo_label" min="-2" max="-2" attributes="0"/>
Expand All @@ -191,7 +193,10 @@
<Group type="103" groupAlignment="1" attributes="0">
<Component id="logo_label" min="-2" max="-2" attributes="0"/>
<Component id="smart_proxy_status" alignment="1" min="-2" pref="24" max="-2" attributes="0"/>
<Component id="kiss_server_status" alignment="1" min="-2" pref="24" max="-2" attributes="0"/>
<Group type="103" alignment="1" groupAlignment="0" attributes="0">
<Component id="mc_reverse_status" min="-2" pref="24" max="-2" attributes="0"/>
<Component id="kiss_server_status" min="-2" pref="24" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace min="-2" pref="2" max="-2" attributes="0"/>
</Group>
Expand All @@ -212,15 +217,30 @@
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
<Font name="Dialog" size="14" style="2"/>
</Property>
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="66" green="66" red="66" type="rgb"/>
</Property>
<Property name="doubleBuffered" type="boolean" value="true"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="mc_reverse_status">
<Properties>
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
<Font name="Dialog" size="14" style="2"/>
</Property>
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="66" green="66" red="66" type="rgb"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="smart_proxy_status">
<Properties>
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
<Font name="Dialog" size="14" style="2"/>
</Property>
<Property name="horizontalAlignment" type="int" value="4"/>
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="66" green="66" red="66" type="rgb"/>
</Property>
<Property name="doubleBuffered" type="boolean" value="true"/>
</Properties>
</Component>
Expand Down Expand Up @@ -253,7 +273,7 @@
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="status_down_label" pref="679" max="32767" attributes="0"/>
<Component id="status_down_label" pref="699" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="close_all_finished_down_button" min="-2" max="-2" attributes="0"/>
</Group>
Expand Down Expand Up @@ -297,6 +317,9 @@
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
<Font name="Dialog" size="16" style="2"/>
</Property>
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="66" green="66" red="66" type="rgb"/>
</Property>
<Property name="doubleBuffered" type="boolean" value="true"/>
</Properties>
</Component>
Expand Down Expand Up @@ -376,7 +399,7 @@
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="status_up_label" pref="679" max="32767" attributes="0"/>
<Component id="status_up_label" pref="699" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="close_all_finished_up_button" min="-2" max="-2" attributes="0"/>
</Group>
Expand Down Expand Up @@ -420,6 +443,9 @@
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
<Font name="Dialog" size="16" style="2"/>
</Property>
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="66" green="66" red="66" type="rgb"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JButton" name="close_all_finished_up_button">
Expand Down
Loading

0 comments on commit db05ac4

Please sign in to comment.