mirror of
https://github.com/tonikelope/megabasterd.git
synced 2025-04-30 06:34:39 +02:00
Compare commits
20 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
fda0fac577 | ||
![]() |
fed9f142d0 | ||
![]() |
fadb7ea2cc | ||
![]() |
762d3692e9 | ||
![]() |
5378954bb5 | ||
![]() |
d16baf4866 | ||
![]() |
5353110c3e | ||
![]() |
91dafbce45 | ||
![]() |
53c65de717 | ||
![]() |
ba8336e60d | ||
![]() |
fc03de1d3b | ||
![]() |
7f8ba83209 | ||
![]() |
c2c0c764b5 | ||
![]() |
7a8f1d5ea3 | ||
![]() |
62de862ac8 | ||
![]() |
8ce5b11f85 | ||
![]() |
3c327bc2d1 | ||
![]() |
3c39435114 | ||
![]() |
52d5ae66c8 | ||
![]() |
9e5b7d1100 |
@ -5,7 +5,7 @@
|
|||||||
<p align="center"><i>"If it compiles, it's good; if it boots up, it's perfect." (Linus Torvalds)</i></p>
|
<p align="center"><i>"If it compiles, it's good; if it boots up, it's perfect." (Linus Torvalds)</i></p>
|
||||||
<p align="center"><a href="https://github.com/tonikelope/megabasterd/releases/latest" target="_blank"><img src="https://raw.githubusercontent.com/tonikelope/megabasterd/master/src/main/resources/images/mbasterd_logo_git.png"></a></p>
|
<p align="center"><a href="https://github.com/tonikelope/megabasterd/releases/latest" target="_blank"><img src="https://raw.githubusercontent.com/tonikelope/megabasterd/master/src/main/resources/images/mbasterd_logo_git.png"></a></p>
|
||||||
<h2 align="center"><a href="https://github.com/tonikelope/megabasterd/releases/latest" target="_blank"><b>Download latest build</b></a></h2>
|
<h2 align="center"><a href="https://github.com/tonikelope/megabasterd/releases/latest" target="_blank"><b>Download latest build</b></a></h2>
|
||||||
<h3 align="center"><i>Note: MegaBasterd jar version requires <a href="https://adoptium.net/es/temurin/releases/?version=11" target="_blank">Java 11 or later</a></i></h3>
|
<h3 align="center"><i>Note: MegaBasterd jar version requires <a href="https://adoptium.net/es/temurin/releases/?version=11" target="_blank">Java 11 or later</a> (at the moment it works in Java 8 but it is not guaranteed).</i></h3>
|
||||||
<p align="center"><a href="https://github.com/tonikelope/megabasterd/releases/latest" target="_blank"><img src="https://raw.githubusercontent.com/tonikelope/megabasterd/master/src/main/resources/images/linux-mac-windows.png"></a></p>
|
<p align="center"><a href="https://github.com/tonikelope/megabasterd/releases/latest" target="_blank"><img src="https://raw.githubusercontent.com/tonikelope/megabasterd/master/src/main/resources/images/linux-mac-windows.png"></a></p>
|
||||||
<p align="center"><a href="https://github.com/tonikelope/megabasterd/issues/397"><b>Would you like to help by translating MegaBasterd into your favorite language?</b></a></p>
|
<p align="center"><a href="https://github.com/tonikelope/megabasterd/issues/397"><b>Would you like to help by translating MegaBasterd into your favorite language?</b></a></p>
|
||||||
|
|
||||||
@ -14,8 +14,11 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<p align="center"><a href="https://youtu.be/5TkBXT7osQI"><b>MegaBasterd DEMO</b></a></p>
|
<p align="center"><a href="https://youtu.be/5TkBXT7osQI"><b>MegaBasterd DEMO</b></a></p>
|
||||||
|
|
||||||
<p align="center"><img src="https://raw.githubusercontent.com/tonikelope/megabasterd/master/src/main/resources/images/ethereum_toni.png"></p>
|
<p align="center"><img src="https://raw.githubusercontent.com/tonikelope/megabasterd/master/coffee.png"><br><img src="https://raw.githubusercontent.com/tonikelope/megabasterd/master/src/main/resources/images/ethereum_toni.png"></p>
|
||||||
|
|
||||||
<p align="center"><a href="https://github.com/tonikelope/megabasterd/issues/385#issuecomment-1019215670">BONUS: Why the f*ck has MegaBasterd stopped downloading?</a></p>
|
<p align="center"><a href="https://github.com/tonikelope/megabasterd/issues/385#issuecomment-1019215670">BONUS: Why the f*ck has MegaBasterd stopped downloading?</a></p>
|
||||||
|
|
||||||
|
<p align="center"><b>IMPORTANT:</b> You are not authorized to use MegaBasterd in any way that violates <a href="https://mega.io/es/terms"><b>MEGA's terms of use</b></a>.</p>
|
||||||
|
BIN
coffee.png
Normal file
BIN
coffee.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.0 KiB |
2
pom.xml
2
pom.xml
@ -3,7 +3,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>com.tonikelope</groupId>
|
<groupId>com.tonikelope</groupId>
|
||||||
<artifactId>MegaBasterd</artifactId>
|
<artifactId>MegaBasterd</artifactId>
|
||||||
<version>8.13</version>
|
<version>8.22</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
|
@ -194,7 +194,15 @@ public class ChunkDownloader implements Runnable, SecureSingleThreadNotifiable {
|
|||||||
|
|
||||||
if (_current_smart_proxy != null && chunk_error) {
|
if (_current_smart_proxy != null && chunk_error) {
|
||||||
|
|
||||||
proxy_manager.blockProxy(_current_smart_proxy, timeout ? "TIMEOUT!" : "HTTP " + String.valueOf(http_error));
|
if (!timeout && http_error != 429) {
|
||||||
|
proxy_manager.blockProxy(_current_smart_proxy, timeout ? "TIMEOUT!" : "HTTP " + String.valueOf(http_error));
|
||||||
|
} else if (timeout) {
|
||||||
|
_excluded_proxy_list.add(_current_smart_proxy);
|
||||||
|
LOG.log(Level.WARNING, "{0} Worker [{1}] PROXY {2} TIMEOUT", new Object[]{Thread.currentThread().getName(), _id, _current_smart_proxy});
|
||||||
|
} else {
|
||||||
|
_excluded_proxy_list.add(_current_smart_proxy);
|
||||||
|
LOG.log(Level.WARNING, "{0} Worker [{1}] PROXY {2} TOO MANY CONNECTIONS", new Object[]{Thread.currentThread().getName(), _id, _current_smart_proxy});
|
||||||
|
}
|
||||||
|
|
||||||
String[] smart_proxy = proxy_manager.getProxy(_excluded_proxy_list);
|
String[] smart_proxy = proxy_manager.getProxy(_excluded_proxy_list);
|
||||||
|
|
||||||
@ -274,6 +282,8 @@ public class ChunkDownloader implements Runnable, SecureSingleThreadNotifiable {
|
|||||||
|
|
||||||
timeout = false;
|
timeout = false;
|
||||||
|
|
||||||
|
http_error = 0;
|
||||||
|
|
||||||
File tmp_chunk_file = null, chunk_file = null;
|
File tmp_chunk_file = null, chunk_file = null;
|
||||||
|
|
||||||
LOG.log(Level.INFO, "{0} Worker [{1}] is downloading chunk [{2}]! {3}", new Object[]{Thread.currentThread().getName(), _id, chunk_id, _download.getFile_name()});
|
LOG.log(Level.INFO, "{0} Worker [{1}] is downloading chunk [{2}]! {3}", new Object[]{Thread.currentThread().getName(), _id, chunk_id, _download.getFile_name()});
|
||||||
@ -431,7 +441,7 @@ public class ChunkDownloader implements Runnable, SecureSingleThreadNotifiable {
|
|||||||
setExit(true);
|
setExit(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else if (proxy_manager != null && proxy_manager.isReset_slot_proxy()) {
|
||||||
_current_smart_proxy = null;
|
_current_smart_proxy = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@ import java.nio.file.Paths;
|
|||||||
import java.security.InvalidAlgorithmParameterException;
|
import java.security.InvalidAlgorithmParameterException;
|
||||||
import java.security.InvalidKeyException;
|
import java.security.InvalidKeyException;
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.NoSuchAlgorithmException;
|
||||||
|
import java.util.concurrent.locks.ReentrantLock;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import javax.crypto.CipherInputStream;
|
import javax.crypto.CipherInputStream;
|
||||||
@ -32,6 +33,8 @@ public class ChunkWriterManager implements Runnable, SecureSingleThreadNotifiabl
|
|||||||
|
|
||||||
private static final Logger LOG = Logger.getLogger(ChunkWriterManager.class.getName());
|
private static final Logger LOG = Logger.getLogger(ChunkWriterManager.class.getName());
|
||||||
|
|
||||||
|
private static final ReentrantLock JOIN_CHUNKS_LOCK = new ReentrantLock();
|
||||||
|
|
||||||
public static long calculateChunkOffset(long chunk_id, int size_multi) {
|
public static long calculateChunkOffset(long chunk_id, int size_multi) {
|
||||||
long[] offs = {0, 128, 384, 768, 1280, 1920, 2688};
|
long[] offs = {0, 128, 384, 768, 1280, 1920, 2688};
|
||||||
|
|
||||||
@ -179,71 +182,89 @@ public class ChunkWriterManager implements Runnable, SecureSingleThreadNotifiabl
|
|||||||
LOG.log(Level.INFO, "{0} ChunkWriterManager LAST CHUNK WRITTEN -> [{1}] {2} {3}...", new Object[]{Thread.currentThread().getName(), _last_chunk_id_written, _bytes_written, _download.getFile_name()});
|
LOG.log(Level.INFO, "{0} ChunkWriterManager LAST CHUNK WRITTEN -> [{1}] {2} {3}...", new Object[]{Thread.currentThread().getName(), _last_chunk_id_written, _bytes_written, _download.getFile_name()});
|
||||||
boolean download_finished = false;
|
boolean download_finished = false;
|
||||||
if (_file_size > 0) {
|
if (_file_size > 0) {
|
||||||
while (!_exit && (!_download.isStopped() || !_download.getChunkworkers().isEmpty()) && _bytes_written < _file_size) {
|
|
||||||
|
|
||||||
if (!download_finished && _download.getProgress() == _file_size) {
|
try {
|
||||||
|
|
||||||
finishDownload();
|
while (!_exit && (!_download.isStopped() || !_download.getChunkworkers().isEmpty()) && _bytes_written < _file_size) {
|
||||||
download_finished = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean chunk_io_error;
|
if (!JOIN_CHUNKS_LOCK.isHeldByCurrentThread()) {
|
||||||
|
LOG.log(Level.INFO, "{0} ChunkWriterManager: JOIN LOCK LOCKED FOR {1}", new Object[]{Thread.currentThread().getName(), _download.getFile_name()});
|
||||||
do {
|
JOIN_CHUNKS_LOCK.lock();
|
||||||
|
|
||||||
chunk_io_error = false;
|
|
||||||
|
|
||||||
try {
|
|
||||||
|
|
||||||
File chunk_file = new File(getChunks_dir() + "/" + MiscTools.HashString("sha1", _download.getUrl()) + ".chunk" + String.valueOf(_last_chunk_id_written + 1));
|
|
||||||
|
|
||||||
while (chunk_file.exists() && chunk_file.canRead() && chunk_file.canWrite() && chunk_file.length() > 0) {
|
|
||||||
|
|
||||||
if (!download_finished && _download.getProgress() == _file_size) {
|
|
||||||
|
|
||||||
finishDownload();
|
|
||||||
download_finished = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
byte[] buffer = new byte[MainPanel.DEFAULT_BYTE_BUFFER_SIZE];
|
|
||||||
|
|
||||||
int reads;
|
|
||||||
|
|
||||||
try (CipherInputStream cis = new CipherInputStream(new BufferedInputStream(new FileInputStream(chunk_file)), genDecrypter("AES", "AES/CTR/NoPadding", _byte_file_key, forwardMEGALinkKeyIV(_byte_iv, _bytes_written)))) {
|
|
||||||
while ((reads = cis.read(buffer)) != -1) {
|
|
||||||
_download.getOutput_stream().write(buffer, 0, reads);
|
|
||||||
}
|
|
||||||
} catch (NoSuchAlgorithmException | NoSuchPaddingException | InvalidKeyException | InvalidAlgorithmParameterException ex) {
|
|
||||||
LOG.log(Level.SEVERE, ex.getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
_bytes_written += chunk_file.length();
|
|
||||||
|
|
||||||
_last_chunk_id_written++;
|
|
||||||
|
|
||||||
LOG.log(Level.INFO, "{0} ChunkWriterManager has written to disk chunk [{1}] {2} {3} {4}...", new Object[]{Thread.currentThread().getName(), _last_chunk_id_written, _bytes_written, _download.calculateLastWrittenChunk(_bytes_written), _download.getFile_name()});
|
|
||||||
|
|
||||||
chunk_file.delete();
|
|
||||||
|
|
||||||
chunk_file = new File(getChunks_dir() + "/" + MiscTools.HashString("sha1", _download.getUrl()) + ".chunk" + String.valueOf(_last_chunk_id_written + 1));
|
|
||||||
|
|
||||||
}
|
|
||||||
} catch (IOException ex) {
|
|
||||||
chunk_io_error = true;
|
|
||||||
LOG.log(Level.WARNING, ex.getMessage());
|
|
||||||
MiscTools.pausar(1000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} while (chunk_io_error);
|
if (!download_finished && _download.getProgress() == _file_size) {
|
||||||
|
|
||||||
if (!_exit && (!_download.isStopped() || !_download.getChunkworkers().isEmpty()) && _bytes_written < _file_size) {
|
finishDownload();
|
||||||
|
download_finished = true;
|
||||||
|
}
|
||||||
|
|
||||||
LOG.log(Level.INFO, "{0} ChunkWriterManager waiting for chunk [{1}] {2}...", new Object[]{Thread.currentThread().getName(), _last_chunk_id_written + 1, _download.getFile_name()});
|
boolean chunk_io_error;
|
||||||
|
|
||||||
secureWait();
|
do {
|
||||||
|
|
||||||
|
chunk_io_error = false;
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
File chunk_file = new File(getChunks_dir() + "/" + MiscTools.HashString("sha1", _download.getUrl()) + ".chunk" + String.valueOf(_last_chunk_id_written + 1));
|
||||||
|
|
||||||
|
while (chunk_file.exists() && chunk_file.canRead() && chunk_file.canWrite() && chunk_file.length() > 0) {
|
||||||
|
|
||||||
|
if (!download_finished && _download.getProgress() == _file_size) {
|
||||||
|
|
||||||
|
finishDownload();
|
||||||
|
download_finished = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
byte[] buffer = new byte[MainPanel.DEFAULT_BYTE_BUFFER_SIZE];
|
||||||
|
|
||||||
|
int reads;
|
||||||
|
|
||||||
|
try (CipherInputStream cis = new CipherInputStream(new BufferedInputStream(new FileInputStream(chunk_file)), genDecrypter("AES", "AES/CTR/NoPadding", _byte_file_key, forwardMEGALinkKeyIV(_byte_iv, _bytes_written)))) {
|
||||||
|
while ((reads = cis.read(buffer)) != -1) {
|
||||||
|
_download.getOutput_stream().write(buffer, 0, reads);
|
||||||
|
}
|
||||||
|
} catch (NoSuchAlgorithmException | NoSuchPaddingException | InvalidKeyException | InvalidAlgorithmParameterException ex) {
|
||||||
|
LOG.log(Level.SEVERE, ex.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
_bytes_written += chunk_file.length();
|
||||||
|
|
||||||
|
_last_chunk_id_written++;
|
||||||
|
|
||||||
|
LOG.log(Level.INFO, "{0} ChunkWriterManager has written to disk chunk [{1}] {2} {3} {4}...", new Object[]{Thread.currentThread().getName(), _last_chunk_id_written, _bytes_written, _download.calculateLastWrittenChunk(_bytes_written), _download.getFile_name()});
|
||||||
|
|
||||||
|
chunk_file.delete();
|
||||||
|
|
||||||
|
chunk_file = new File(getChunks_dir() + "/" + MiscTools.HashString("sha1", _download.getUrl()) + ".chunk" + String.valueOf(_last_chunk_id_written + 1));
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (IOException ex) {
|
||||||
|
chunk_io_error = true;
|
||||||
|
LOG.log(Level.WARNING, ex.getMessage());
|
||||||
|
MiscTools.pausar(1000);
|
||||||
|
}
|
||||||
|
|
||||||
|
} while (chunk_io_error);
|
||||||
|
|
||||||
|
if (!_exit && (!_download.isStopped() || !_download.getChunkworkers().isEmpty()) && _bytes_written < _file_size) {
|
||||||
|
|
||||||
|
LOG.log(Level.INFO, "{0} ChunkWriterManager waiting for chunk [{1}] {2}...", new Object[]{Thread.currentThread().getName(), _last_chunk_id_written + 1, _download.getFile_name()});
|
||||||
|
|
||||||
|
if (JOIN_CHUNKS_LOCK.isHeldByCurrentThread() && JOIN_CHUNKS_LOCK.isLocked()) {
|
||||||
|
LOG.log(Level.INFO, "{0} ChunkWriterManager: JOIN LOCK RELEASED FOR {1}", new Object[]{Thread.currentThread().getName(), _download.getFile_name()});
|
||||||
|
JOIN_CHUNKS_LOCK.unlock();
|
||||||
|
}
|
||||||
|
|
||||||
|
secureWait();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} finally {
|
||||||
|
if (JOIN_CHUNKS_LOCK.isHeldByCurrentThread() && JOIN_CHUNKS_LOCK.isLocked()) {
|
||||||
|
LOG.log(Level.INFO, "{0} ChunkWriterManager: JOIN LOCK RELEASED FOR {1}", new Object[]{Thread.currentThread().getName(), _download.getFile_name()});
|
||||||
|
JOIN_CHUNKS_LOCK.unlock();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_bytes_written == _file_size && MiscTools.isDirEmpty(Paths.get(getChunks_dir()))) {
|
if (_bytes_written == _file_size && MiscTools.isDirEmpty(Paths.get(getChunks_dir()))) {
|
||||||
|
@ -1534,7 +1534,6 @@ public class Download implements Transference, Runnable, SecureSingleThreadNotif
|
|||||||
_retrying_request = true;
|
_retrying_request = true;
|
||||||
|
|
||||||
MiscTools.GUIRun(() -> {
|
MiscTools.GUIRun(() -> {
|
||||||
getMain_panel().getView().getNew_download_menu().setEnabled(true);
|
|
||||||
|
|
||||||
getView().getStop_button().setVisible(true);
|
getView().getStop_button().setVisible(true);
|
||||||
|
|
||||||
|
@ -537,7 +537,7 @@ public class FileGrabberDialog extends javax.swing.JDialog {
|
|||||||
|
|
||||||
_base_path = files_selected[0].getParentFile().getAbsolutePath();
|
_base_path = files_selected[0].getParentFile().getAbsolutePath();
|
||||||
|
|
||||||
dir_name_textfield.setText(files_selected[0].getParentFile().getName() + "_" + String.valueOf(System.currentTimeMillis() / 1000));
|
dir_name_textfield.setText(files_selected[0].getParentFile().getName());
|
||||||
|
|
||||||
dir_name_textfield.setEnabled(true);
|
dir_name_textfield.setEnabled(true);
|
||||||
|
|
||||||
@ -639,7 +639,7 @@ public class FileGrabberDialog extends javax.swing.JDialog {
|
|||||||
|
|
||||||
_base_path = filechooser.getSelectedFile().getAbsolutePath();
|
_base_path = filechooser.getSelectedFile().getAbsolutePath();
|
||||||
|
|
||||||
dir_name_textfield.setText(filechooser.getSelectedFile().getName() + "_" + String.valueOf(System.currentTimeMillis() / 1000));
|
dir_name_textfield.setText(filechooser.getSelectedFile().getName());
|
||||||
|
|
||||||
dir_name_textfield.setEnabled(true);
|
dir_name_textfield.setEnabled(true);
|
||||||
|
|
||||||
@ -1022,7 +1022,7 @@ public class FileGrabberDialog extends javax.swing.JDialog {
|
|||||||
_base_path = (files.size() == 1 && files.get(0).isDirectory()) ? files.get(0).getAbsolutePath() : files.get(0).getParentFile().getAbsolutePath();
|
_base_path = (files.size() == 1 && files.get(0).isDirectory()) ? files.get(0).getAbsolutePath() : files.get(0).getParentFile().getAbsolutePath();
|
||||||
|
|
||||||
MiscTools.GUIRunAndWait(() -> {
|
MiscTools.GUIRunAndWait(() -> {
|
||||||
dir_name_textfield.setText(((files.size() == 1 && files.get(0).isDirectory()) ? files.get(0).getName() : files.get(0).getParentFile().getName()) + "_" + String.valueOf(System.currentTimeMillis() / 1000));
|
dir_name_textfield.setText(((files.size() == 1 && files.get(0).isDirectory()) ? files.get(0).getName() : files.get(0).getParentFile().getName()));
|
||||||
|
|
||||||
dir_name_textfield.setEnabled(true);
|
dir_name_textfield.setEnabled(true);
|
||||||
|
|
||||||
|
@ -41,7 +41,6 @@ public class FileSplitterDialog extends javax.swing.JDialog {
|
|||||||
private final MainPanel _main_panel;
|
private final MainPanel _main_panel;
|
||||||
private File[] _files = null;
|
private File[] _files = null;
|
||||||
private File _output_dir = null;
|
private File _output_dir = null;
|
||||||
private volatile String _sha1 = null;
|
|
||||||
private volatile long _progress = 0L;
|
private volatile long _progress = 0L;
|
||||||
private volatile Path _current_part = null;
|
private volatile Path _current_part = null;
|
||||||
private volatile int _current_file = 0;
|
private volatile int _current_file = 0;
|
||||||
@ -86,17 +85,6 @@ public class FileSplitterDialog extends javax.swing.JDialog {
|
|||||||
|
|
||||||
private boolean _splitFile(int i) throws IOException {
|
private boolean _splitFile(int i) throws IOException {
|
||||||
|
|
||||||
_sha1 = "";
|
|
||||||
|
|
||||||
THREAD_POOL.execute(() -> {
|
|
||||||
|
|
||||||
try {
|
|
||||||
_sha1 = MiscTools.computeFileSHA1(new File(_files[i].getAbsolutePath()));
|
|
||||||
} catch (IOException ex) {
|
|
||||||
Logger.getLogger(FileSplitterDialog.class.getName()).log(Level.SEVERE, null, ex);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
this._progress = 0L;
|
this._progress = 0L;
|
||||||
|
|
||||||
int mBperSplit = Integer.parseInt(this.split_size_text.getText());
|
int mBperSplit = Integer.parseInt(this.split_size_text.getText());
|
||||||
@ -135,20 +123,6 @@ public class FileSplitterDialog extends javax.swing.JDialog {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
while ("".equals(_sha1)) {
|
|
||||||
MiscTools.GUIRunAndWait(() -> {
|
|
||||||
|
|
||||||
split_button.setText(LabelTranslatorSingleton.getInstance().translate("GENERATING SHA1, please wait..."));
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
MiscTools.pausar(1000);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_sha1 != null) {
|
|
||||||
Files.writeString(Paths.get(this._files[i].getAbsolutePath() + ".sha1"), _sha1);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -195,9 +169,13 @@ public class FileSplitterDialog extends javax.swing.JDialog {
|
|||||||
monitorProgress(f, byteSize);
|
monitorProgress(f, byteSize);
|
||||||
|
|
||||||
if (!_exit) {
|
if (!_exit) {
|
||||||
|
long dest_bytes_copied = Files.exists(fileName) ? Files.size(fileName) : 0;
|
||||||
|
|
||||||
try (RandomAccessFile toFile = new RandomAccessFile(fileName.toFile(), "rw"); FileChannel toChannel = toFile.getChannel()) {
|
try (RandomAccessFile toFile = new RandomAccessFile(fileName.toFile(), "rw"); FileChannel toChannel = toFile.getChannel()) {
|
||||||
sourceChannel.position(position);
|
while (dest_bytes_copied < byteSize) {
|
||||||
toChannel.transferFrom(sourceChannel, 0, byteSize);
|
sourceChannel.position(position + dest_bytes_copied);
|
||||||
|
dest_bytes_copied += toChannel.transferFrom(sourceChannel, dest_bytes_copied, byteSize - dest_bytes_copied);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,7 +61,6 @@ import static javax.swing.JOptionPane.YES_NO_CANCEL_OPTION;
|
|||||||
import static javax.swing.JOptionPane.showOptionDialog;
|
import static javax.swing.JOptionPane.showOptionDialog;
|
||||||
import javax.swing.JPopupMenu;
|
import javax.swing.JPopupMenu;
|
||||||
import javax.swing.SwingUtilities;
|
import javax.swing.SwingUtilities;
|
||||||
import javax.swing.UIDefaults;
|
|
||||||
import javax.swing.UIManager;
|
import javax.swing.UIManager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -70,7 +69,7 @@ import javax.swing.UIManager;
|
|||||||
*/
|
*/
|
||||||
public final class MainPanel {
|
public final class MainPanel {
|
||||||
|
|
||||||
public static final String VERSION = "8.13";
|
public static final String VERSION = "8.22";
|
||||||
public static final boolean FORCE_SMART_PROXY = false; //TRUE FOR DEBUGING SMART PROXY
|
public static final boolean FORCE_SMART_PROXY = false; //TRUE FOR DEBUGING SMART PROXY
|
||||||
public static final int THROTTLE_SLICE_SIZE = 16 * 1024;
|
public static final int THROTTLE_SLICE_SIZE = 16 * 1024;
|
||||||
public static final int DEFAULT_BYTE_BUFFER_SIZE = 16 * 1024;
|
public static final int DEFAULT_BYTE_BUFFER_SIZE = 16 * 1024;
|
||||||
@ -107,11 +106,6 @@ public final class MainPanel {
|
|||||||
|
|
||||||
public static void main(String args[]) {
|
public static void main(String args[]) {
|
||||||
|
|
||||||
setNimbusLookAndFeel();
|
|
||||||
|
|
||||||
UIDefaults defaults = UIManager.getLookAndFeelDefaults();
|
|
||||||
defaults.put("nimbusOrange", defaults.get("nimbusFocus"));
|
|
||||||
|
|
||||||
if (args.length > 0) {
|
if (args.length > 0) {
|
||||||
|
|
||||||
if (args.length > 1) {
|
if (args.length > 1) {
|
||||||
@ -136,6 +130,20 @@ public final class MainPanel {
|
|||||||
MEGABASTERD_HOME_DIR = f.getParentFile().getAbsolutePath();
|
MEGABASTERD_HOME_DIR = f.getParentFile().getAbsolutePath();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
setupSqliteTables();
|
||||||
|
|
||||||
|
} catch (SQLException ex) {
|
||||||
|
Logger.getLogger(MainPanel.class.getName()).log(SEVERE, null, ex);
|
||||||
|
}
|
||||||
|
|
||||||
|
setNimbusLookAndFeel("yes".equals(DBTools.selectSettingValue("dark_mode")));
|
||||||
|
|
||||||
|
if ("yes".equals(DBTools.selectSettingValue("upload_log"))) {
|
||||||
|
MiscTools.createUploadLogDir();
|
||||||
|
}
|
||||||
|
|
||||||
final MainPanel main_panel = new MainPanel();
|
final MainPanel main_panel = new MainPanel();
|
||||||
|
|
||||||
invokeLater(() -> {
|
invokeLater(() -> {
|
||||||
@ -256,14 +264,6 @@ public final class MainPanel {
|
|||||||
|
|
||||||
_resume_downloads = false;
|
_resume_downloads = false;
|
||||||
|
|
||||||
try {
|
|
||||||
|
|
||||||
setupSqliteTables();
|
|
||||||
|
|
||||||
} catch (SQLException ex) {
|
|
||||||
Logger.getLogger(MainPanel.class.getName()).log(SEVERE, null, ex);
|
|
||||||
}
|
|
||||||
|
|
||||||
loadUserSettings();
|
loadUserSettings();
|
||||||
|
|
||||||
if (_debug_file) {
|
if (_debug_file) {
|
||||||
|
@ -252,7 +252,9 @@ public final class MainPanelView extends javax.swing.JFrame {
|
|||||||
|
|
||||||
byte[] share_key = ma.genShareKey();
|
byte[] share_key = ma.genShareKey();
|
||||||
|
|
||||||
HashMap<String, Object> res = ma.createDir(dir_name != null ? dir_name : dialog.getFiles().get(0).getName() + "_" + genID(10), ma.getRoot_id(), parent_key, i32a2bin(ma.getMaster_key()));
|
String root_name = dir_name != null ? dir_name : dialog.getFiles().get(0).getName() + "_" + genID(10);
|
||||||
|
|
||||||
|
HashMap<String, Object> res = ma.createDir(root_name, ma.getRoot_id(), parent_key, i32a2bin(ma.getMaster_key()));
|
||||||
|
|
||||||
String parent_node = (String) ((Map) ((List) res.get("f")).get(0)).get("h");
|
String parent_node = (String) ((Map) ((List) res.get("f")).get(0)).get("h");
|
||||||
|
|
||||||
@ -274,7 +276,9 @@ public final class MainPanelView extends javax.swing.JFrame {
|
|||||||
|
|
||||||
if (dialog.getUpload_log_checkbox().isSelected()) {
|
if (dialog.getUpload_log_checkbox().isSelected()) {
|
||||||
|
|
||||||
File upload_log = new File(MainPanel.MEGABASTERD_HOME_DIR + "/megabasterd_upload_" + parent_node + ".log");
|
MiscTools.createUploadLogDir();
|
||||||
|
|
||||||
|
File upload_log = new File(MiscTools.UPLOAD_LOGS_DIR + "/megabasterd_upload_" + parent_node + ".log");
|
||||||
upload_log.createNewFile();
|
upload_log.createNewFile();
|
||||||
|
|
||||||
FileWriter fr;
|
FileWriter fr;
|
||||||
@ -291,9 +295,9 @@ public final class MainPanelView extends javax.swing.JFrame {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (folder_share) {
|
if (folder_share) {
|
||||||
res = ma.createDirInsideAnotherSharedDir("MEGABASTERD", parent_node, ma.genFolderKey(), i32a2bin(ma.getMaster_key()), parent_node, share_key);
|
res = ma.createDirInsideAnotherSharedDir(root_name, parent_node, ma.genFolderKey(), i32a2bin(ma.getMaster_key()), parent_node, share_key);
|
||||||
} else {
|
} else {
|
||||||
res = ma.createDir("MEGABASTERD", parent_node, ma.genFolderKey(), i32a2bin(ma.getMaster_key()));
|
res = ma.createDir(root_name, parent_node, ma.genFolderKey(), i32a2bin(ma.getMaster_key()));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -303,7 +307,7 @@ public final class MainPanelView extends javax.swing.JFrame {
|
|||||||
|
|
||||||
MegaDirNode file_paths_2 = new MegaDirNode(file_paths_2_node);
|
MegaDirNode file_paths_2 = new MegaDirNode(file_paths_2_node);
|
||||||
|
|
||||||
file_paths.getChildren().put("MEGABASTERD", file_paths_2);
|
file_paths.getChildren().put(root_name, file_paths_2);
|
||||||
|
|
||||||
file_paths = file_paths_2;
|
file_paths = file_paths_2;
|
||||||
|
|
||||||
@ -1024,8 +1028,6 @@ public final class MainPanelView extends javax.swing.JFrame {
|
|||||||
|
|
||||||
private void new_download_menuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_new_download_menuActionPerformed
|
private void new_download_menuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_new_download_menuActionPerformed
|
||||||
|
|
||||||
new_download_menu.setEnabled(false);
|
|
||||||
|
|
||||||
final LinkGrabberDialog dialog = new LinkGrabberDialog(this, true, _main_panel.getDefault_download_path(), _main_panel.getClipboardspy());
|
final LinkGrabberDialog dialog = new LinkGrabberDialog(this, true, _main_panel.getDefault_download_path(), _main_panel.getClipboardspy());
|
||||||
|
|
||||||
_main_panel.getClipboardspy().attachObserver(dialog);
|
_main_panel.getClipboardspy().attachObserver(dialog);
|
||||||
@ -1132,10 +1134,6 @@ public final class MainPanelView extends javax.swing.JFrame {
|
|||||||
|
|
||||||
getMain_panel().getDownload_manager().secureNotify();
|
getMain_panel().getDownload_manager().secureNotify();
|
||||||
|
|
||||||
MiscTools.GUIRun(() -> {
|
|
||||||
new_download_menu.setEnabled(true);
|
|
||||||
});
|
|
||||||
|
|
||||||
boolean link_warning;
|
boolean link_warning;
|
||||||
|
|
||||||
for (String url : urls) {
|
for (String url : urls) {
|
||||||
@ -1252,10 +1250,6 @@ public final class MainPanelView extends javax.swing.JFrame {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
|
||||||
MiscTools.GUIRun(() -> {
|
|
||||||
new_download_menu.setEnabled(true);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1263,9 +1257,6 @@ public final class MainPanelView extends javax.swing.JFrame {
|
|||||||
|
|
||||||
getMain_panel().getDownload_manager().secureNotify();
|
getMain_panel().getDownload_manager().secureNotify();
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
new_download_menu.setEnabled(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dialog.dispose();
|
dialog.dispose();
|
||||||
|
@ -11,6 +11,7 @@ package com.tonikelope.megabasterd;
|
|||||||
|
|
||||||
import static com.tonikelope.megabasterd.MainPanel.THREAD_POOL;
|
import static com.tonikelope.megabasterd.MainPanel.THREAD_POOL;
|
||||||
import static com.tonikelope.megabasterd.MainPanel.VERSION;
|
import static com.tonikelope.megabasterd.MainPanel.VERSION;
|
||||||
|
import java.awt.Color;
|
||||||
import java.awt.Component;
|
import java.awt.Component;
|
||||||
import java.awt.Container;
|
import java.awt.Container;
|
||||||
import java.awt.Desktop;
|
import java.awt.Desktop;
|
||||||
@ -99,6 +100,8 @@ import javax.swing.JOptionPane;
|
|||||||
import javax.swing.JPanel;
|
import javax.swing.JPanel;
|
||||||
import javax.swing.JTree;
|
import javax.swing.JTree;
|
||||||
import javax.swing.SwingUtilities;
|
import javax.swing.SwingUtilities;
|
||||||
|
import javax.swing.UIDefaults;
|
||||||
|
import javax.swing.UIManager;
|
||||||
import javax.swing.border.TitledBorder;
|
import javax.swing.border.TitledBorder;
|
||||||
import javax.swing.tree.DefaultMutableTreeNode;
|
import javax.swing.tree.DefaultMutableTreeNode;
|
||||||
import javax.swing.tree.DefaultTreeModel;
|
import javax.swing.tree.DefaultTreeModel;
|
||||||
@ -119,6 +122,8 @@ public class MiscTools {
|
|||||||
public static final int EXP_BACKOFF_MAX_WAIT_TIME = 8;
|
public static final int EXP_BACKOFF_MAX_WAIT_TIME = 8;
|
||||||
public static final Object PASS_LOCK = new Object();
|
public static final Object PASS_LOCK = new Object();
|
||||||
public static final int HTTP_TIMEOUT = 30;
|
public static final int HTTP_TIMEOUT = 30;
|
||||||
|
public static final String UPLOAD_LOGS_DIR = System.getProperty("user.home") + File.separator + "MEGABASTERD_UPLOAD_LOGS";
|
||||||
|
|
||||||
private static final Comparator<DefaultMutableTreeNode> TREE_NODE_COMPARATOR = (DefaultMutableTreeNode a, DefaultMutableTreeNode b) -> {
|
private static final Comparator<DefaultMutableTreeNode> TREE_NODE_COMPARATOR = (DefaultMutableTreeNode a, DefaultMutableTreeNode b) -> {
|
||||||
if (a.isLeaf() && !b.isLeaf()) {
|
if (a.isLeaf() && !b.isLeaf()) {
|
||||||
return 1;
|
return 1;
|
||||||
@ -160,6 +165,27 @@ public class MiscTools {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void createUploadLogDir() {
|
||||||
|
|
||||||
|
if (!Files.exists(Paths.get(UPLOAD_LOGS_DIR))) {
|
||||||
|
try {
|
||||||
|
Files.createDirectory(Paths.get(UPLOAD_LOGS_DIR));
|
||||||
|
|
||||||
|
File dir = new File(System.getProperty("user.home"));
|
||||||
|
|
||||||
|
for (File file : dir.listFiles()) {
|
||||||
|
if (!file.isDirectory() && file.getName().startsWith("megabasterd_upload_")) {
|
||||||
|
Files.move(file.toPath(), Paths.get(UPLOAD_LOGS_DIR + File.separator + file.getName()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (IOException ex) {
|
||||||
|
Logger.getLogger(MiscTools.class.getName()).log(Level.SEVERE, null, ex);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void purgeFolderCache() {
|
public static void purgeFolderCache() {
|
||||||
File directory = new File(System.getProperty("java.io.tmpdir"));
|
File directory = new File(System.getProperty("java.io.tmpdir"));
|
||||||
|
|
||||||
@ -257,16 +283,41 @@ public class MiscTools {
|
|||||||
return font;
|
return font;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setNimbusLookAndFeel() {
|
public static void setNimbusLookAndFeel(boolean dark) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
|
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
|
||||||
|
|
||||||
if ("Nimbus".equals(info.getName())) {
|
if ("Nimbus".equals(info.getName())) {
|
||||||
|
|
||||||
javax.swing.UIManager.setLookAndFeel(info.getClassName());
|
javax.swing.UIManager.setLookAndFeel(info.getClassName());
|
||||||
|
|
||||||
|
if (dark) {
|
||||||
|
// Dark LAF
|
||||||
|
UIManager.put("control", new Color(128, 128, 128));
|
||||||
|
UIManager.put("info", new Color(128, 128, 128));
|
||||||
|
UIManager.put("nimbusBase", new Color(18, 30, 49));
|
||||||
|
UIManager.put("nimbusAlertYellow", new Color(248, 187, 0));
|
||||||
|
UIManager.put("nimbusDisabledText", new Color(100, 100, 100));
|
||||||
|
UIManager.put("nimbusFocus", new Color(115, 164, 209));
|
||||||
|
UIManager.put("nimbusGreen", new Color(176, 179, 50));
|
||||||
|
UIManager.put("nimbusInfoBlue", new Color(66, 139, 221));
|
||||||
|
UIManager.put("nimbusLightBackground", new Color(18, 30, 49));
|
||||||
|
UIManager.put("nimbusOrange", new Color(191, 98, 4));
|
||||||
|
UIManager.put("nimbusRed", new Color(169, 46, 34));
|
||||||
|
UIManager.put("nimbusSelectedText", new Color(255, 255, 255));
|
||||||
|
UIManager.put("nimbusSelectionBackground", new Color(104, 93, 156));
|
||||||
|
UIManager.put("text", new Color(230, 230, 230));
|
||||||
|
|
||||||
|
} else {
|
||||||
|
UIDefaults defaults = UIManager.getLookAndFeelDefaults();
|
||||||
|
defaults.put("nimbusOrange", defaults.get("nimbusFocus"));
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | javax.swing.UnsupportedLookAndFeelException ex) {
|
} catch (Exception ex) {
|
||||||
java.util.logging.Logger.getLogger(MiscTools.class.getName()).log(java.util.logging.Level.SEVERE, ex.getMessage());
|
java.util.logging.Logger.getLogger(MiscTools.class.getName()).log(java.util.logging.Level.SEVERE, ex.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -131,58 +131,65 @@
|
|||||||
<Layout>
|
<Layout>
|
||||||
<DimensionLayout dim="0">
|
<DimensionLayout dim="0">
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Group type="102" alignment="0" attributes="0">
|
<Group type="102" attributes="0">
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Component id="smart_proxy_checkbox" alignment="0" min="-2" max="-2" attributes="0"/>
|
|
||||||
<Group type="102" alignment="0" attributes="0">
|
|
||||||
<Component id="max_downloads_label" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
|
||||||
<Component id="max_downloads_spinner" min="-2" max="-2" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
<Component id="multi_slot_down_checkbox" alignment="0" min="-2" max="-2" attributes="0"/>
|
|
||||||
<Group type="102" alignment="0" attributes="0">
|
|
||||||
<Component id="change_download_dir_button" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
|
||||||
<Component id="down_dir_label" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
|
||||||
<Component id="default_dir_label" min="-2" max="-2" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
<Component id="megacrypter_reverse_checkbox" min="-2" max="-2" attributes="0"/>
|
|
||||||
<Component id="use_mega_account_down_checkbox" min="-2" max="-2" attributes="0"/>
|
|
||||||
<Component id="verify_file_down_checkbox" min="-2" max="-2" attributes="0"/>
|
|
||||||
<Component id="limit_download_speed_checkbox" alignment="0" min="-2" max="-2" attributes="0"/>
|
|
||||||
<Component id="clipboardspy_checkbox" alignment="0" min="-2" max="-2" attributes="0"/>
|
|
||||||
<Group type="102" attributes="0">
|
<Group type="102" attributes="0">
|
||||||
<EmptySpace min="21" pref="21" max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Component id="rec_download_slots_label" alignment="0" min="-2" max="-2" attributes="0"/>
|
<Component id="smart_proxy_checkbox" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||||
<Group type="102" alignment="0" attributes="0">
|
<Group type="102" alignment="0" attributes="0">
|
||||||
<Component id="default_slots_down_label" min="-2" max="-2" attributes="0"/>
|
<Component id="max_downloads_label" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Component id="default_slots_down_spinner" min="-2" max="-2" attributes="0"/>
|
<Component id="max_downloads_spinner" min="-2" max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
|
<Component id="multi_slot_down_checkbox" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||||
<Group type="102" alignment="0" attributes="0">
|
<Group type="102" alignment="0" attributes="0">
|
||||||
<Component id="use_mega_label" min="-2" max="-2" attributes="0"/>
|
<Component id="change_download_dir_button" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Component id="use_mega_account_down_combobox" min="-2" pref="700" max="-2" attributes="0"/>
|
<Component id="down_dir_label" min="-2" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
<Component id="default_dir_label" min="-2" max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
<Component id="megacrypter_reverse_warning_label" min="-2" max="-2" attributes="0"/>
|
<Component id="megacrypter_reverse_checkbox" min="-2" max="-2" attributes="0"/>
|
||||||
|
<Component id="use_mega_account_down_checkbox" min="-2" max="-2" attributes="0"/>
|
||||||
|
<Component id="verify_file_down_checkbox" min="-2" max="-2" attributes="0"/>
|
||||||
|
<Component id="limit_download_speed_checkbox" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||||
|
<Component id="clipboardspy_checkbox" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||||
<Group type="102" attributes="0">
|
<Group type="102" attributes="0">
|
||||||
<Component id="megacrypter_reverse_port_label" min="-2" max="-2" attributes="0"/>
|
<EmptySpace min="21" pref="21" max="-2" attributes="0"/>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Component id="megacrypter_reverse_port_spinner" min="-2" max="-2" attributes="0"/>
|
<Component id="rec_download_slots_label" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||||
</Group>
|
<Group type="102" alignment="0" attributes="0">
|
||||||
<Group type="102" alignment="0" attributes="0">
|
<Component id="default_slots_down_label" min="-2" max="-2" attributes="0"/>
|
||||||
<Component id="max_down_speed_label" min="-2" max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<Component id="default_slots_down_spinner" min="-2" max="-2" attributes="0"/>
|
||||||
<Component id="max_down_speed_spinner" min="-2" max="-2" attributes="0"/>
|
</Group>
|
||||||
|
<Group type="102" alignment="0" attributes="0">
|
||||||
|
<Component id="use_mega_label" min="-2" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
<Component id="use_mega_account_down_combobox" min="-2" pref="700" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
<Component id="megacrypter_reverse_warning_label" min="-2" max="-2" attributes="0"/>
|
||||||
|
<Group type="102" attributes="0">
|
||||||
|
<Component id="megacrypter_reverse_port_label" min="-2" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
<Component id="megacrypter_reverse_port_spinner" min="-2" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
<Group type="102" alignment="0" attributes="0">
|
||||||
|
<Component id="max_down_speed_label" min="-2" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
<Component id="max_down_speed_spinner" min="-2" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
<Component id="smart_proxy_settings" alignment="0" min="-2" max="-2" attributes="0"/>
|
<Group type="102" alignment="0" attributes="0">
|
||||||
|
<EmptySpace min="-2" pref="12" max="-2" attributes="0"/>
|
||||||
|
<Component id="smart_proxy_settings" min="-2" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
</DimensionLayout>
|
</DimensionLayout>
|
||||||
@ -398,6 +405,9 @@
|
|||||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||||
<Font name="Dialog" size="18" style="0"/>
|
<Font name="Dialog" size="18" style="0"/>
|
||||||
</Property>
|
</Property>
|
||||||
|
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||||
|
<Color blue="ff" green="0" red="33" type="rgb"/>
|
||||||
|
</Property>
|
||||||
<Property name="text" type="java.lang.String" value="default dir"/>
|
<Property name="text" type="java.lang.String" value="default dir"/>
|
||||||
<Property name="opaque" type="boolean" value="true"/>
|
<Property name="opaque" type="boolean" value="true"/>
|
||||||
</Properties>
|
</Properties>
|
||||||
@ -478,41 +488,59 @@
|
|||||||
<Layout>
|
<Layout>
|
||||||
<DimensionLayout dim="0">
|
<DimensionLayout dim="0">
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
|
<Group type="102" alignment="0" attributes="0">
|
||||||
|
<Component id="force_smart_proxy_checkbox" min="-2" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
<Component id="jLabel7" max="32767" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
<Component id="custom_proxy_list_label" alignment="0" max="32767" attributes="0"/>
|
||||||
|
<Component id="jScrollPane1" alignment="0" max="32767" attributes="0"/>
|
||||||
<Group type="102" attributes="0">
|
<Group type="102" attributes="0">
|
||||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Group type="102" attributes="0">
|
<Group type="102" attributes="0">
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Component id="rec_smart_proxy_label1" alignment="0" min="-2" max="-2" attributes="0"/>
|
<Component id="rec_smart_proxy_label1" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||||
<Component id="rec_smart_proxy_label" alignment="0" min="-2" max="-2" attributes="0"/>
|
<Component id="rec_smart_proxy_label" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||||
<Component id="rec_smart_proxy_label2" alignment="0" min="-2" max="-2" attributes="0"/>
|
|
||||||
<Group type="102" alignment="0" attributes="0">
|
<Group type="102" alignment="0" attributes="0">
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="1" max="-2" attributes="0">
|
||||||
<Component id="jLabel3" alignment="0" min="-2" max="-2" attributes="0"/>
|
<Group type="102" attributes="0">
|
||||||
<Component id="jLabel5" alignment="0" min="-2" max="-2" attributes="0"/>
|
<Component id="jLabel9" min="-2" max="-2" attributes="0"/>
|
||||||
</Group>
|
<EmptySpace pref="49" max="32767" attributes="0"/>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<Component id="proxy_random_radio" min="-2" max="-2" attributes="0"/>
|
||||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||||
<Component id="bad_proxy_time_spinner" max="32767" attributes="0"/>
|
<Component id="proxy_sequential_radio" min="-2" max="-2" attributes="0"/>
|
||||||
<Component id="proxy_timeout_spinner" max="32767" attributes="0"/>
|
</Group>
|
||||||
|
<Group type="102" attributes="0">
|
||||||
|
<Group type="103" groupAlignment="1" attributes="0">
|
||||||
|
<Component id="jLabel5" alignment="0" min="-2" pref="248" max="-2" attributes="0"/>
|
||||||
|
<Component id="jLabel8" alignment="0" min="-2" pref="248" max="-2" attributes="0"/>
|
||||||
|
<Component id="jLabel3" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
<EmptySpace max="32767" attributes="0"/>
|
||||||
|
<Group type="103" groupAlignment="1" max="-2" attributes="0">
|
||||||
|
<Component id="bad_proxy_time_spinner" alignment="0" pref="150" max="32767" attributes="0"/>
|
||||||
|
<Component id="auto_refresh_proxy_time_spinner" alignment="0" max="32767" attributes="0"/>
|
||||||
|
<Component id="proxy_timeout_spinner" max="32767" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Component id="jLabel4" min="-2" max="-2" attributes="0"/>
|
<Component id="jLabel4" min="-2" max="-2" attributes="0"/>
|
||||||
<Component id="jLabel6" min="-2" max="-2" attributes="0"/>
|
<Component id="jLabel6" min="-2" max="-2" attributes="0"/>
|
||||||
|
<Component id="jLabel11" min="-2" max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
<Group type="102" alignment="0" attributes="0">
|
<Group type="102" alignment="0" attributes="0">
|
||||||
<Component id="force_smart_proxy_checkbox" min="-2" max="-2" attributes="0"/>
|
<Component id="proxy_reset_slot_checkbox" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Component id="jLabel7" max="32767" attributes="0"/>
|
<Component id="jLabel10" min="-2" max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
<Component id="custom_proxy_list_label" alignment="0" max="32767" attributes="0"/>
|
|
||||||
<Component id="jScrollPane1" alignment="0" max="32767" attributes="0"/>
|
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace max="32767" attributes="0"/>
|
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
</DimensionLayout>
|
</DimensionLayout>
|
||||||
@ -522,10 +550,20 @@
|
|||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Component id="rec_smart_proxy_label" min="-2" max="-2" attributes="0"/>
|
<Component id="rec_smart_proxy_label" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Component id="rec_smart_proxy_label2" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
|
||||||
<Component id="rec_smart_proxy_label1" min="-2" max="-2" attributes="0"/>
|
<Component id="rec_smart_proxy_label1" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
<Group type="103" groupAlignment="3" attributes="0">
|
||||||
|
<Component id="proxy_random_radio" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
|
<Component id="proxy_sequential_radio" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
|
<Component id="jLabel9" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
|
<Component id="jLabel11" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
<Group type="103" groupAlignment="3" attributes="0">
|
||||||
|
<Component id="jLabel8" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
|
<Component id="auto_refresh_proxy_time_spinner" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Group type="103" groupAlignment="3" attributes="0">
|
<Group type="103" groupAlignment="3" attributes="0">
|
||||||
<Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/>
|
<Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
<Component id="bad_proxy_time_spinner" alignment="3" min="-2" max="-2" attributes="0"/>
|
<Component id="bad_proxy_time_spinner" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
@ -537,6 +575,11 @@
|
|||||||
<Component id="proxy_timeout_spinner" alignment="3" min="-2" max="-2" attributes="0"/>
|
<Component id="proxy_timeout_spinner" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
<Component id="jLabel6" alignment="3" min="-2" max="-2" attributes="0"/>
|
<Component id="jLabel6" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
|
<EmptySpace min="-2" pref="7" max="-2" attributes="0"/>
|
||||||
|
<Group type="103" groupAlignment="3" attributes="0">
|
||||||
|
<Component id="proxy_reset_slot_checkbox" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
|
<Component id="jLabel10" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Group type="103" groupAlignment="3" attributes="0">
|
<Group type="103" groupAlignment="3" attributes="0">
|
||||||
<Component id="force_smart_proxy_checkbox" alignment="3" min="-2" max="-2" attributes="0"/>
|
<Component id="force_smart_proxy_checkbox" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
@ -642,14 +685,6 @@
|
|||||||
<Property name="opaque" type="boolean" value="true"/>
|
<Property name="opaque" type="boolean" value="true"/>
|
||||||
</Properties>
|
</Properties>
|
||||||
</Component>
|
</Component>
|
||||||
<Component class="javax.swing.JLabel" name="rec_smart_proxy_label2">
|
|
||||||
<Properties>
|
|
||||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
|
||||||
<Font name="Dialog" size="16" style="2"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="text" type="java.lang.String" value="Note2: proxies are selected RANDOMLY. "/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JLabel" name="rec_smart_proxy_label">
|
<Component class="javax.swing.JLabel" name="rec_smart_proxy_label">
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||||
@ -681,7 +716,79 @@
|
|||||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||||
<Font name="Noto Sans" size="16" style="2"/>
|
<Font name="Noto Sans" size="16" style="2"/>
|
||||||
</Property>
|
</Property>
|
||||||
<Property name="text" type="java.lang.String" value="Forces the use of smart proxy even if we still have direct bandwidth available (useful to test proxies)."/>
|
<Property name="text" type="java.lang.String" value="Forces the use of smart proxy even if we still have direct bandwidth available (useful to test proxies)"/>
|
||||||
|
</Properties>
|
||||||
|
</Component>
|
||||||
|
<Component class="javax.swing.JLabel" name="jLabel8">
|
||||||
|
<Properties>
|
||||||
|
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||||
|
<Font name="Noto Sans" size="16" style="1"/>
|
||||||
|
</Property>
|
||||||
|
<Property name="text" type="java.lang.String" value="Proxy list refresh (minutes):"/>
|
||||||
|
</Properties>
|
||||||
|
</Component>
|
||||||
|
<Component class="javax.swing.JSpinner" name="auto_refresh_proxy_time_spinner">
|
||||||
|
<Properties>
|
||||||
|
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||||
|
<Font name="Noto Sans" size="16" style="0"/>
|
||||||
|
</Property>
|
||||||
|
<Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
|
||||||
|
<SpinnerModel initial="60" minimum="1" numberType="java.lang.Integer" stepSize="1" type="number"/>
|
||||||
|
</Property>
|
||||||
|
</Properties>
|
||||||
|
</Component>
|
||||||
|
<Component class="javax.swing.JRadioButton" name="proxy_random_radio">
|
||||||
|
<Properties>
|
||||||
|
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||||
|
<Font name="Noto Sans" size="16" style="0"/>
|
||||||
|
</Property>
|
||||||
|
<Property name="text" type="java.lang.String" value="RANDOM"/>
|
||||||
|
</Properties>
|
||||||
|
<Events>
|
||||||
|
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="proxy_random_radioActionPerformed"/>
|
||||||
|
</Events>
|
||||||
|
</Component>
|
||||||
|
<Component class="javax.swing.JRadioButton" name="proxy_sequential_radio">
|
||||||
|
<Properties>
|
||||||
|
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||||
|
<Font name="Noto Sans" size="16" style="0"/>
|
||||||
|
</Property>
|
||||||
|
<Property name="text" type="java.lang.String" value="SEQUENTIAL"/>
|
||||||
|
</Properties>
|
||||||
|
<Events>
|
||||||
|
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="proxy_sequential_radioActionPerformed"/>
|
||||||
|
</Events>
|
||||||
|
</Component>
|
||||||
|
<Component class="javax.swing.JLabel" name="jLabel9">
|
||||||
|
<Properties>
|
||||||
|
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||||
|
<Font name="Noto Sans" size="16" style="1"/>
|
||||||
|
</Property>
|
||||||
|
<Property name="text" type="java.lang.String" value="Proxy selection order:"/>
|
||||||
|
</Properties>
|
||||||
|
</Component>
|
||||||
|
<Component class="javax.swing.JCheckBox" name="proxy_reset_slot_checkbox">
|
||||||
|
<Properties>
|
||||||
|
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||||
|
<Font name="Noto Sans" size="16" style="1"/>
|
||||||
|
</Property>
|
||||||
|
<Property name="text" type="java.lang.String" value="Reset slot proxy after successfully downloading a chunk"/>
|
||||||
|
</Properties>
|
||||||
|
</Component>
|
||||||
|
<Component class="javax.swing.JLabel" name="jLabel10">
|
||||||
|
<Properties>
|
||||||
|
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||||
|
<Font name="Noto Sans" size="16" style="2"/>
|
||||||
|
</Property>
|
||||||
|
<Property name="text" type="java.lang.String" value="(Useful to avoid getting trapped in slow proxies)"/>
|
||||||
|
</Properties>
|
||||||
|
</Component>
|
||||||
|
<Component class="javax.swing.JLabel" name="jLabel11">
|
||||||
|
<Properties>
|
||||||
|
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||||
|
<Font name="Noto Sans" size="16" style="2"/>
|
||||||
|
</Property>
|
||||||
|
<Property name="text" type="java.lang.String" value="(If you have a list of proxies sorted from best to worst, check sequential)"/>
|
||||||
</Properties>
|
</Properties>
|
||||||
</Component>
|
</Component>
|
||||||
</SubComponents>
|
</SubComponents>
|
||||||
@ -906,9 +1013,12 @@
|
|||||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||||
<Font name="Noto Sans" size="18" style="1"/>
|
<Font name="Noto Sans" size="18" style="1"/>
|
||||||
</Property>
|
</Property>
|
||||||
|
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||||
|
<Color blue="ff" green="33" red="0" type="rgb"/>
|
||||||
|
</Property>
|
||||||
<Property name="lineWrap" type="boolean" value="true"/>
|
<Property name="lineWrap" type="boolean" value="true"/>
|
||||||
<Property name="rows" type="int" value="5"/>
|
<Property name="rows" type="int" value="5"/>
|
||||||
<Property name="text" type="java.lang.String" value="THIS OPTION IS NOT RECOMMENDED. Using this will cause MegaBasterd uploaded folder to appear in your account as NOT DECRYPTABLE. 

At the time of writing there is a method to FIX IT:

1) Move "MEGABASTERD" FOLDER (first "child" folder of the upload folder) to the ROOT (cloud) folder of your account. 

2) Then go to account settings and RELOAD ACCOUNT. 

I don't know how long this method will last. USE THIS OPTION AT YOUR OWN RISK."/>
|
<Property name="text" type="java.lang.String" value="THIS OPTION IS NOT RECOMMENDED. Using this will cause MegaBasterd uploaded folder to appear in your account as NOT DECRYPTABLE. 

At the time of writing this text, there is a method to FIX IT:

1) Move first upload subfolder to the ROOT (CLOUD) folder of your account. 

2) Go to account settings and click RELOAD ACCOUNT. 

I don't know how long this method will last. USE THIS OPTION AT YOUR OWN RISK."/>
|
||||||
<Property name="wrapStyleWord" type="boolean" value="true"/>
|
<Property name="wrapStyleWord" type="boolean" value="true"/>
|
||||||
</Properties>
|
</Properties>
|
||||||
</Component>
|
</Component>
|
||||||
@ -1265,31 +1375,26 @@
|
|||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Component id="run_command_textbox" max="32767" attributes="0"/>
|
<Component id="run_command_textbox" max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
<Group type="102" attributes="0">
|
<Component id="start_frozen_checkbox" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="102" alignment="0" attributes="0">
|
||||||
<Component id="start_frozen_checkbox" alignment="0" min="-2" max="-2" attributes="0"/>
|
<Component id="debug_file_checkbox" min="-2" max="-2" attributes="0"/>
|
||||||
<Group type="102" alignment="0" attributes="0">
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Component id="debug_file_checkbox" min="-2" max="-2" attributes="0"/>
|
<Component id="debug_file_path" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
</Group>
|
||||||
<Component id="debug_file_path" min="-2" max="-2" attributes="0"/>
|
<Group type="102" alignment="0" attributes="0">
|
||||||
</Group>
|
<EmptySpace min="-2" pref="165" max="-2" attributes="0"/>
|
||||||
<Group type="102" alignment="0" attributes="0">
|
<Component id="custom_chunks_dir_current_label" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace min="-2" pref="165" max="-2" attributes="0"/>
|
</Group>
|
||||||
<Component id="custom_chunks_dir_current_label" min="-2" max="-2" attributes="0"/>
|
<Component id="rec_zoom_label" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||||
</Group>
|
<Component id="run_command_checkbox" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||||
<Component id="rec_zoom_label" alignment="0" min="-2" max="-2" attributes="0"/>
|
<Group type="102" alignment="0" attributes="0">
|
||||||
<Component id="run_command_checkbox" alignment="0" min="-2" max="-2" attributes="0"/>
|
<Component id="custom_chunks_dir_checkbox" min="-2" max="-2" attributes="0"/>
|
||||||
<Group type="102" alignment="0" attributes="0">
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Component id="custom_chunks_dir_checkbox" min="-2" max="-2" attributes="0"/>
|
<Component id="custom_chunks_dir_button" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
</Group>
|
||||||
<Component id="custom_chunks_dir_button" min="-2" max="-2" attributes="0"/>
|
<Group type="103" alignment="0" groupAlignment="1" max="-2" attributes="0">
|
||||||
</Group>
|
<Component id="jPanel1" alignment="0" max="32767" attributes="0"/>
|
||||||
<Group type="103" alignment="0" groupAlignment="1" max="-2" attributes="0">
|
<Component id="jPanel2" alignment="0" max="32767" attributes="0"/>
|
||||||
<Component id="jPanel1" alignment="0" max="32767" attributes="0"/>
|
|
||||||
<Component id="jPanel2" alignment="0" max="32767" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
</Group>
|
|
||||||
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
|
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
@ -1726,23 +1831,26 @@
|
|||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Group type="102" attributes="0">
|
<Group type="102" attributes="0">
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Group type="103" alignment="0" groupAlignment="0" max="-2" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Group type="102" alignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="102" alignment="0" attributes="0">
|
||||||
<Component id="zoom_label" alignment="0" min="-2" max="-2" attributes="0"/>
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Component id="font_label" alignment="0" min="-2" max="-2" attributes="0"/>
|
<Component id="zoom_label" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||||
|
<Component id="font_label" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
<EmptySpace max="32767" attributes="0"/>
|
||||||
|
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||||
|
<Component id="font_combo" max="32767" attributes="0"/>
|
||||||
|
<Component id="zoom_spinner" min="-2" pref="351" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace max="32767" attributes="0"/>
|
<Group type="102" alignment="0" attributes="0">
|
||||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
|
||||||
<Component id="font_combo" max="32767" attributes="0"/>
|
<EmptySpace max="32767" attributes="0"/>
|
||||||
<Component id="zoom_spinner" min="-2" pref="351" max="-2" attributes="0"/>
|
<Component id="language_combo" min="-2" pref="351" max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
<Group type="102" alignment="0" attributes="0">
|
<Component id="dark_mode_checkbox" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||||
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace max="32767" attributes="0"/>
|
|
||||||
<Component id="language_combo" min="-2" pref="351" max="-2" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
@ -1767,6 +1875,8 @@
|
|||||||
<Component id="language_combo" alignment="3" min="-2" max="-2" attributes="0"/>
|
<Component id="language_combo" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
<Component id="dark_mode_checkbox" min="-2" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
</DimensionLayout>
|
</DimensionLayout>
|
||||||
@ -1831,6 +1941,14 @@
|
|||||||
<Property name="doubleBuffered" type="boolean" value="true"/>
|
<Property name="doubleBuffered" type="boolean" value="true"/>
|
||||||
</Properties>
|
</Properties>
|
||||||
</Component>
|
</Component>
|
||||||
|
<Component class="javax.swing.JCheckBox" name="dark_mode_checkbox">
|
||||||
|
<Properties>
|
||||||
|
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||||
|
<Font name="Dialog" size="18" style="1"/>
|
||||||
|
</Property>
|
||||||
|
<Property name="text" type="java.lang.String" value="DARK MODE"/>
|
||||||
|
</Properties>
|
||||||
|
</Component>
|
||||||
</SubComponents>
|
</SubComponents>
|
||||||
</Container>
|
</Container>
|
||||||
<Component class="javax.swing.JLabel" name="debug_file_path">
|
<Component class="javax.swing.JLabel" name="debug_file_path">
|
||||||
|
@ -12,6 +12,7 @@ package com.tonikelope.megabasterd;
|
|||||||
import static com.tonikelope.megabasterd.DBTools.*;
|
import static com.tonikelope.megabasterd.DBTools.*;
|
||||||
import static com.tonikelope.megabasterd.MainPanel.*;
|
import static com.tonikelope.megabasterd.MainPanel.*;
|
||||||
import static com.tonikelope.megabasterd.MiscTools.*;
|
import static com.tonikelope.megabasterd.MiscTools.*;
|
||||||
|
import static com.tonikelope.megabasterd.SmartMegaProxyManager.PROXY_AUTO_REFRESH_TIME;
|
||||||
import static com.tonikelope.megabasterd.SmartMegaProxyManager.PROXY_BLOCK_TIME;
|
import static com.tonikelope.megabasterd.SmartMegaProxyManager.PROXY_BLOCK_TIME;
|
||||||
import java.awt.Dialog;
|
import java.awt.Dialog;
|
||||||
import java.awt.Frame;
|
import java.awt.Frame;
|
||||||
@ -324,6 +325,18 @@ public class SettingsDialog extends javax.swing.JDialog {
|
|||||||
|
|
||||||
max_up_speed_spinner.setEnabled(limit_ul_speed);
|
max_up_speed_spinner.setEnabled(limit_ul_speed);
|
||||||
|
|
||||||
|
String smartproxy_auto_refresh = DBTools.selectSettingValue("smartproxy_autorefresh_time");
|
||||||
|
|
||||||
|
int smartproxy_auto_refresh_int = PROXY_AUTO_REFRESH_TIME;
|
||||||
|
|
||||||
|
if (smartproxy_auto_refresh != null) {
|
||||||
|
smartproxy_auto_refresh_int = Integer.parseInt(smartproxy_auto_refresh);
|
||||||
|
}
|
||||||
|
|
||||||
|
auto_refresh_proxy_time_spinner.setModel(new SpinnerNumberModel(smartproxy_auto_refresh_int, 1, Integer.MAX_VALUE, 1));
|
||||||
|
|
||||||
|
((JSpinner.DefaultEditor) auto_refresh_proxy_time_spinner.getEditor()).getTextField().setEditable(true);
|
||||||
|
|
||||||
String smartproxy_ban_time = DBTools.selectSettingValue("smartproxy_ban_time");
|
String smartproxy_ban_time = DBTools.selectSettingValue("smartproxy_ban_time");
|
||||||
|
|
||||||
int smartproxy_ban_time_int = PROXY_BLOCK_TIME;
|
int smartproxy_ban_time_int = PROXY_BLOCK_TIME;
|
||||||
@ -346,7 +359,44 @@ public class SettingsDialog extends javax.swing.JDialog {
|
|||||||
|
|
||||||
proxy_timeout_spinner.setModel(new SpinnerNumberModel(smartproxy_timeout_int, 1, Integer.MAX_VALUE, 1));
|
proxy_timeout_spinner.setModel(new SpinnerNumberModel(smartproxy_timeout_int, 1, Integer.MAX_VALUE, 1));
|
||||||
|
|
||||||
((JSpinner.DefaultEditor) bad_proxy_time_spinner.getEditor()).getTextField().setEditable(true);
|
((JSpinner.DefaultEditor) proxy_timeout_spinner.getEditor()).getTextField().setEditable(true);
|
||||||
|
|
||||||
|
boolean reset_slot_proxy = SmartMegaProxyManager.RESET_SLOT_PROXY;
|
||||||
|
|
||||||
|
String sreset_slot_proxy = DBTools.selectSettingValue("reset_slot_proxy");
|
||||||
|
|
||||||
|
if (sreset_slot_proxy != null) {
|
||||||
|
|
||||||
|
reset_slot_proxy = sreset_slot_proxy.equals("yes");
|
||||||
|
}
|
||||||
|
|
||||||
|
proxy_reset_slot_checkbox.setSelected(reset_slot_proxy);
|
||||||
|
|
||||||
|
boolean random_select = SmartMegaProxyManager.RANDOM_SELECT;
|
||||||
|
|
||||||
|
String srandom_select = DBTools.selectSettingValue("random_proxy");
|
||||||
|
|
||||||
|
if (srandom_select != null) {
|
||||||
|
|
||||||
|
random_select = srandom_select.equals("yes");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (random_select) {
|
||||||
|
proxy_random_radio.setSelected(true);
|
||||||
|
} else {
|
||||||
|
proxy_sequential_radio.setSelected(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean dark_mode = false;
|
||||||
|
|
||||||
|
String dark_mode_select = DBTools.selectSettingValue("dark_mode");
|
||||||
|
|
||||||
|
if (dark_mode_select != null) {
|
||||||
|
|
||||||
|
dark_mode = dark_mode_select.equals("yes");
|
||||||
|
}
|
||||||
|
|
||||||
|
dark_mode_checkbox.setSelected(dark_mode);
|
||||||
|
|
||||||
String max_ul_speed = DBTools.selectSettingValue("max_upload_speed");
|
String max_ul_speed = DBTools.selectSettingValue("max_upload_speed");
|
||||||
|
|
||||||
@ -766,11 +816,18 @@ public class SettingsDialog extends javax.swing.JDialog {
|
|||||||
custom_proxy_textarea = new javax.swing.JTextArea();
|
custom_proxy_textarea = new javax.swing.JTextArea();
|
||||||
rec_smart_proxy_label1 = new javax.swing.JLabel();
|
rec_smart_proxy_label1 = new javax.swing.JLabel();
|
||||||
custom_proxy_list_label = new javax.swing.JLabel();
|
custom_proxy_list_label = new javax.swing.JLabel();
|
||||||
rec_smart_proxy_label2 = new javax.swing.JLabel();
|
|
||||||
rec_smart_proxy_label = new javax.swing.JLabel();
|
rec_smart_proxy_label = new javax.swing.JLabel();
|
||||||
proxy_timeout_spinner = new javax.swing.JSpinner();
|
proxy_timeout_spinner = new javax.swing.JSpinner();
|
||||||
force_smart_proxy_checkbox = new javax.swing.JCheckBox();
|
force_smart_proxy_checkbox = new javax.swing.JCheckBox();
|
||||||
jLabel7 = new javax.swing.JLabel();
|
jLabel7 = new javax.swing.JLabel();
|
||||||
|
jLabel8 = new javax.swing.JLabel();
|
||||||
|
auto_refresh_proxy_time_spinner = new javax.swing.JSpinner();
|
||||||
|
proxy_random_radio = new javax.swing.JRadioButton();
|
||||||
|
proxy_sequential_radio = new javax.swing.JRadioButton();
|
||||||
|
jLabel9 = new javax.swing.JLabel();
|
||||||
|
proxy_reset_slot_checkbox = new javax.swing.JCheckBox();
|
||||||
|
jLabel10 = new javax.swing.JLabel();
|
||||||
|
jLabel11 = new javax.swing.JLabel();
|
||||||
uploads_scrollpane = new javax.swing.JScrollPane();
|
uploads_scrollpane = new javax.swing.JScrollPane();
|
||||||
uploads_panel = new javax.swing.JPanel();
|
uploads_panel = new javax.swing.JPanel();
|
||||||
default_slots_up_label = new javax.swing.JLabel();
|
default_slots_up_label = new javax.swing.JLabel();
|
||||||
@ -837,6 +894,7 @@ public class SettingsDialog extends javax.swing.JDialog {
|
|||||||
font_combo = new javax.swing.JComboBox<>();
|
font_combo = new javax.swing.JComboBox<>();
|
||||||
zoom_label = new javax.swing.JLabel();
|
zoom_label = new javax.swing.JLabel();
|
||||||
zoom_spinner = new javax.swing.JSpinner();
|
zoom_spinner = new javax.swing.JSpinner();
|
||||||
|
dark_mode_checkbox = new javax.swing.JCheckBox();
|
||||||
debug_file_path = new javax.swing.JLabel();
|
debug_file_path = new javax.swing.JLabel();
|
||||||
status = new javax.swing.JLabel();
|
status = new javax.swing.JLabel();
|
||||||
|
|
||||||
@ -950,6 +1008,7 @@ public class SettingsDialog extends javax.swing.JDialog {
|
|||||||
|
|
||||||
default_dir_label.setBackground(new java.awt.Color(153, 255, 153));
|
default_dir_label.setBackground(new java.awt.Color(153, 255, 153));
|
||||||
default_dir_label.setFont(new java.awt.Font("Dialog", 0, 18)); // NOI18N
|
default_dir_label.setFont(new java.awt.Font("Dialog", 0, 18)); // NOI18N
|
||||||
|
default_dir_label.setForeground(new java.awt.Color(51, 0, 255));
|
||||||
default_dir_label.setText("default dir");
|
default_dir_label.setText("default dir");
|
||||||
default_dir_label.setOpaque(true);
|
default_dir_label.setOpaque(true);
|
||||||
|
|
||||||
@ -1020,9 +1079,6 @@ public class SettingsDialog extends javax.swing.JDialog {
|
|||||||
custom_proxy_list_label.setText("[*]IP:PORT[@user_b64:password_b64] OR #PROXY_LIST_URL");
|
custom_proxy_list_label.setText("[*]IP:PORT[@user_b64:password_b64] OR #PROXY_LIST_URL");
|
||||||
custom_proxy_list_label.setOpaque(true);
|
custom_proxy_list_label.setOpaque(true);
|
||||||
|
|
||||||
rec_smart_proxy_label2.setFont(new java.awt.Font("Dialog", 2, 16)); // NOI18N
|
|
||||||
rec_smart_proxy_label2.setText("Note2: proxies are selected RANDOMLY. ");
|
|
||||||
|
|
||||||
rec_smart_proxy_label.setFont(new java.awt.Font("Dialog", 2, 16)); // NOI18N
|
rec_smart_proxy_label.setFont(new java.awt.Font("Dialog", 2, 16)); // NOI18N
|
||||||
rec_smart_proxy_label.setText("Note1: enable it in order to mitigate bandwidth limit. (Multislot is required) ");
|
rec_smart_proxy_label.setText("Note1: enable it in order to mitigate bandwidth limit. (Multislot is required) ");
|
||||||
|
|
||||||
@ -1033,39 +1089,87 @@ public class SettingsDialog extends javax.swing.JDialog {
|
|||||||
force_smart_proxy_checkbox.setText("FORCE SMART PROXY");
|
force_smart_proxy_checkbox.setText("FORCE SMART PROXY");
|
||||||
|
|
||||||
jLabel7.setFont(new java.awt.Font("Noto Sans", 2, 16)); // NOI18N
|
jLabel7.setFont(new java.awt.Font("Noto Sans", 2, 16)); // NOI18N
|
||||||
jLabel7.setText("Forces the use of smart proxy even if we still have direct bandwidth available (useful to test proxies).");
|
jLabel7.setText("Forces the use of smart proxy even if we still have direct bandwidth available (useful to test proxies)");
|
||||||
|
|
||||||
|
jLabel8.setFont(new java.awt.Font("Noto Sans", 1, 16)); // NOI18N
|
||||||
|
jLabel8.setText("Proxy list refresh (minutes):");
|
||||||
|
|
||||||
|
auto_refresh_proxy_time_spinner.setFont(new java.awt.Font("Noto Sans", 0, 16)); // NOI18N
|
||||||
|
auto_refresh_proxy_time_spinner.setModel(new javax.swing.SpinnerNumberModel(60, 1, null, 1));
|
||||||
|
|
||||||
|
proxy_random_radio.setFont(new java.awt.Font("Noto Sans", 0, 16)); // NOI18N
|
||||||
|
proxy_random_radio.setText("RANDOM");
|
||||||
|
proxy_random_radio.addActionListener(new java.awt.event.ActionListener() {
|
||||||
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||||
|
proxy_random_radioActionPerformed(evt);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
proxy_sequential_radio.setFont(new java.awt.Font("Noto Sans", 0, 16)); // NOI18N
|
||||||
|
proxy_sequential_radio.setText("SEQUENTIAL");
|
||||||
|
proxy_sequential_radio.addActionListener(new java.awt.event.ActionListener() {
|
||||||
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||||
|
proxy_sequential_radioActionPerformed(evt);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
jLabel9.setFont(new java.awt.Font("Noto Sans", 1, 16)); // NOI18N
|
||||||
|
jLabel9.setText("Proxy selection order:");
|
||||||
|
|
||||||
|
proxy_reset_slot_checkbox.setFont(new java.awt.Font("Noto Sans", 1, 16)); // NOI18N
|
||||||
|
proxy_reset_slot_checkbox.setText("Reset slot proxy after successfully downloading a chunk");
|
||||||
|
|
||||||
|
jLabel10.setFont(new java.awt.Font("Noto Sans", 2, 16)); // NOI18N
|
||||||
|
jLabel10.setText("(Useful to avoid getting trapped in slow proxies)");
|
||||||
|
|
||||||
|
jLabel11.setFont(new java.awt.Font("Noto Sans", 2, 16)); // NOI18N
|
||||||
|
jLabel11.setText("(If you have a list of proxies sorted from best to worst, check sequential)");
|
||||||
|
|
||||||
javax.swing.GroupLayout smart_proxy_settingsLayout = new javax.swing.GroupLayout(smart_proxy_settings);
|
javax.swing.GroupLayout smart_proxy_settingsLayout = new javax.swing.GroupLayout(smart_proxy_settings);
|
||||||
smart_proxy_settings.setLayout(smart_proxy_settingsLayout);
|
smart_proxy_settings.setLayout(smart_proxy_settingsLayout);
|
||||||
smart_proxy_settingsLayout.setHorizontalGroup(
|
smart_proxy_settingsLayout.setHorizontalGroup(
|
||||||
smart_proxy_settingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
smart_proxy_settingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addGroup(smart_proxy_settingsLayout.createSequentialGroup()
|
.addGroup(smart_proxy_settingsLayout.createSequentialGroup()
|
||||||
.addGroup(smart_proxy_settingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
.addComponent(force_smart_proxy_checkbox)
|
||||||
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
|
.addComponent(jLabel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||||
|
.addComponent(custom_proxy_list_label, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
|
.addComponent(jScrollPane1)
|
||||||
|
.addGroup(smart_proxy_settingsLayout.createSequentialGroup()
|
||||||
|
.addGroup(smart_proxy_settingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addGroup(smart_proxy_settingsLayout.createSequentialGroup()
|
.addGroup(smart_proxy_settingsLayout.createSequentialGroup()
|
||||||
.addContainerGap()
|
.addContainerGap()
|
||||||
.addGroup(smart_proxy_settingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
.addGroup(smart_proxy_settingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addComponent(rec_smart_proxy_label1)
|
.addComponent(rec_smart_proxy_label1)
|
||||||
.addComponent(rec_smart_proxy_label)
|
.addComponent(rec_smart_proxy_label)
|
||||||
.addComponent(rec_smart_proxy_label2)
|
|
||||||
.addGroup(smart_proxy_settingsLayout.createSequentialGroup()
|
.addGroup(smart_proxy_settingsLayout.createSequentialGroup()
|
||||||
.addGroup(smart_proxy_settingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
.addGroup(smart_proxy_settingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
|
||||||
.addComponent(jLabel3)
|
.addGroup(smart_proxy_settingsLayout.createSequentialGroup()
|
||||||
.addComponent(jLabel5))
|
.addComponent(jLabel9)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 49, Short.MAX_VALUE)
|
||||||
.addGroup(smart_proxy_settingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
.addComponent(proxy_random_radio)
|
||||||
.addComponent(bad_proxy_time_spinner)
|
.addGap(18, 18, 18)
|
||||||
.addComponent(proxy_timeout_spinner))
|
.addComponent(proxy_sequential_radio))
|
||||||
|
.addGroup(smart_proxy_settingsLayout.createSequentialGroup()
|
||||||
|
.addGroup(smart_proxy_settingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||||
|
.addComponent(jLabel5, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 248, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
|
.addComponent(jLabel8, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 248, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
|
.addComponent(jLabel3, javax.swing.GroupLayout.Alignment.LEADING))
|
||||||
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
|
.addGroup(smart_proxy_settingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
|
||||||
|
.addComponent(bad_proxy_time_spinner, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 150, Short.MAX_VALUE)
|
||||||
|
.addComponent(auto_refresh_proxy_time_spinner, javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addComponent(proxy_timeout_spinner))))
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addGroup(smart_proxy_settingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
.addGroup(smart_proxy_settingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addComponent(jLabel4)
|
.addComponent(jLabel4)
|
||||||
.addComponent(jLabel6)))))
|
.addComponent(jLabel6)
|
||||||
|
.addComponent(jLabel11)))))
|
||||||
.addGroup(smart_proxy_settingsLayout.createSequentialGroup()
|
.addGroup(smart_proxy_settingsLayout.createSequentialGroup()
|
||||||
.addComponent(force_smart_proxy_checkbox)
|
.addComponent(proxy_reset_slot_checkbox)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(jLabel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
.addComponent(jLabel10)))
|
||||||
.addComponent(custom_proxy_list_label, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
.addGap(0, 0, Short.MAX_VALUE))
|
||||||
.addComponent(jScrollPane1))
|
|
||||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
|
||||||
);
|
);
|
||||||
smart_proxy_settingsLayout.setVerticalGroup(
|
smart_proxy_settingsLayout.setVerticalGroup(
|
||||||
smart_proxy_settingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
smart_proxy_settingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
@ -1073,10 +1177,18 @@ public class SettingsDialog extends javax.swing.JDialog {
|
|||||||
.addContainerGap()
|
.addContainerGap()
|
||||||
.addComponent(rec_smart_proxy_label)
|
.addComponent(rec_smart_proxy_label)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(rec_smart_proxy_label2)
|
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
||||||
.addComponent(rec_smart_proxy_label1)
|
.addComponent(rec_smart_proxy_label1)
|
||||||
.addGap(18, 18, 18)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
|
.addGroup(smart_proxy_settingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||||
|
.addComponent(proxy_random_radio)
|
||||||
|
.addComponent(proxy_sequential_radio)
|
||||||
|
.addComponent(jLabel9)
|
||||||
|
.addComponent(jLabel11))
|
||||||
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
|
.addGroup(smart_proxy_settingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||||
|
.addComponent(jLabel8)
|
||||||
|
.addComponent(auto_refresh_proxy_time_spinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||||
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addGroup(smart_proxy_settingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
.addGroup(smart_proxy_settingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||||
.addComponent(jLabel3)
|
.addComponent(jLabel3)
|
||||||
.addComponent(bad_proxy_time_spinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
.addComponent(bad_proxy_time_spinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
@ -1086,6 +1198,10 @@ public class SettingsDialog extends javax.swing.JDialog {
|
|||||||
.addComponent(jLabel5)
|
.addComponent(jLabel5)
|
||||||
.addComponent(proxy_timeout_spinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
.addComponent(proxy_timeout_spinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addComponent(jLabel6))
|
.addComponent(jLabel6))
|
||||||
|
.addGap(7, 7, 7)
|
||||||
|
.addGroup(smart_proxy_settingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||||
|
.addComponent(proxy_reset_slot_checkbox)
|
||||||
|
.addComponent(jLabel10))
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addGroup(smart_proxy_settingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
.addGroup(smart_proxy_settingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||||
.addComponent(force_smart_proxy_checkbox)
|
.addComponent(force_smart_proxy_checkbox)
|
||||||
@ -1102,48 +1218,52 @@ public class SettingsDialog extends javax.swing.JDialog {
|
|||||||
downloads_panelLayout.setHorizontalGroup(
|
downloads_panelLayout.setHorizontalGroup(
|
||||||
downloads_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
downloads_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addGroup(downloads_panelLayout.createSequentialGroup()
|
.addGroup(downloads_panelLayout.createSequentialGroup()
|
||||||
.addContainerGap()
|
|
||||||
.addGroup(downloads_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
.addGroup(downloads_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addComponent(smart_proxy_checkbox)
|
|
||||||
.addGroup(downloads_panelLayout.createSequentialGroup()
|
.addGroup(downloads_panelLayout.createSequentialGroup()
|
||||||
.addComponent(max_downloads_label)
|
.addContainerGap()
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
||||||
.addComponent(max_downloads_spinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
|
||||||
.addComponent(multi_slot_down_checkbox)
|
|
||||||
.addGroup(downloads_panelLayout.createSequentialGroup()
|
|
||||||
.addComponent(change_download_dir_button)
|
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
||||||
.addComponent(down_dir_label)
|
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
||||||
.addComponent(default_dir_label))
|
|
||||||
.addComponent(megacrypter_reverse_checkbox)
|
|
||||||
.addComponent(use_mega_account_down_checkbox)
|
|
||||||
.addComponent(verify_file_down_checkbox)
|
|
||||||
.addComponent(limit_download_speed_checkbox)
|
|
||||||
.addComponent(clipboardspy_checkbox)
|
|
||||||
.addGroup(downloads_panelLayout.createSequentialGroup()
|
|
||||||
.addGap(21, 21, 21)
|
|
||||||
.addGroup(downloads_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
.addGroup(downloads_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addComponent(rec_download_slots_label)
|
.addComponent(smart_proxy_checkbox)
|
||||||
.addGroup(downloads_panelLayout.createSequentialGroup()
|
.addGroup(downloads_panelLayout.createSequentialGroup()
|
||||||
.addComponent(default_slots_down_label)
|
.addComponent(max_downloads_label)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(default_slots_down_spinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
.addComponent(max_downloads_spinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||||
|
.addComponent(multi_slot_down_checkbox)
|
||||||
.addGroup(downloads_panelLayout.createSequentialGroup()
|
.addGroup(downloads_panelLayout.createSequentialGroup()
|
||||||
.addComponent(use_mega_label)
|
.addComponent(change_download_dir_button)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(use_mega_account_down_combobox, javax.swing.GroupLayout.PREFERRED_SIZE, 700, javax.swing.GroupLayout.PREFERRED_SIZE))
|
.addComponent(down_dir_label)
|
||||||
.addComponent(megacrypter_reverse_warning_label)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
|
.addComponent(default_dir_label))
|
||||||
|
.addComponent(megacrypter_reverse_checkbox)
|
||||||
|
.addComponent(use_mega_account_down_checkbox)
|
||||||
|
.addComponent(verify_file_down_checkbox)
|
||||||
|
.addComponent(limit_download_speed_checkbox)
|
||||||
|
.addComponent(clipboardspy_checkbox)
|
||||||
.addGroup(downloads_panelLayout.createSequentialGroup()
|
.addGroup(downloads_panelLayout.createSequentialGroup()
|
||||||
.addComponent(megacrypter_reverse_port_label)
|
.addGap(21, 21, 21)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addGroup(downloads_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addComponent(megacrypter_reverse_port_spinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
.addComponent(rec_download_slots_label)
|
||||||
.addGroup(downloads_panelLayout.createSequentialGroup()
|
.addGroup(downloads_panelLayout.createSequentialGroup()
|
||||||
.addComponent(max_down_speed_label)
|
.addComponent(default_slots_down_label)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(max_down_speed_spinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
|
.addComponent(default_slots_down_spinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||||
.addComponent(smart_proxy_settings, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
.addGroup(downloads_panelLayout.createSequentialGroup()
|
||||||
.addGap(0, 0, 0))
|
.addComponent(use_mega_label)
|
||||||
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
|
.addComponent(use_mega_account_down_combobox, javax.swing.GroupLayout.PREFERRED_SIZE, 700, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||||
|
.addComponent(megacrypter_reverse_warning_label)
|
||||||
|
.addGroup(downloads_panelLayout.createSequentialGroup()
|
||||||
|
.addComponent(megacrypter_reverse_port_label)
|
||||||
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
|
.addComponent(megacrypter_reverse_port_spinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||||
|
.addGroup(downloads_panelLayout.createSequentialGroup()
|
||||||
|
.addComponent(max_down_speed_label)
|
||||||
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
|
.addComponent(max_down_speed_spinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))))
|
||||||
|
.addGroup(downloads_panelLayout.createSequentialGroup()
|
||||||
|
.addGap(12, 12, 12)
|
||||||
|
.addComponent(smart_proxy_settings, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||||
|
.addContainerGap())
|
||||||
);
|
);
|
||||||
downloads_panelLayout.setVerticalGroup(
|
downloads_panelLayout.setVerticalGroup(
|
||||||
downloads_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
downloads_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
@ -1257,9 +1377,10 @@ public class SettingsDialog extends javax.swing.JDialog {
|
|||||||
public_folder_warning.setBackground(new java.awt.Color(255, 255, 51));
|
public_folder_warning.setBackground(new java.awt.Color(255, 255, 51));
|
||||||
public_folder_warning.setColumns(20);
|
public_folder_warning.setColumns(20);
|
||||||
public_folder_warning.setFont(new java.awt.Font("Noto Sans", 1, 18)); // NOI18N
|
public_folder_warning.setFont(new java.awt.Font("Noto Sans", 1, 18)); // NOI18N
|
||||||
|
public_folder_warning.setForeground(new java.awt.Color(0, 51, 255));
|
||||||
public_folder_warning.setLineWrap(true);
|
public_folder_warning.setLineWrap(true);
|
||||||
public_folder_warning.setRows(5);
|
public_folder_warning.setRows(5);
|
||||||
public_folder_warning.setText("THIS OPTION IS NOT RECOMMENDED. Using this will cause MegaBasterd uploaded folder to appear in your account as NOT DECRYPTABLE. \n\nAt the time of writing there is a method to FIX IT:\n\n1) Move \"MEGABASTERD\" FOLDER (first \"child\" folder of the upload folder) to the ROOT (cloud) folder of your account. \n\n2) Then go to account settings and RELOAD ACCOUNT. \n\nI don't know how long this method will last. USE THIS OPTION AT YOUR OWN RISK.");
|
public_folder_warning.setText("THIS OPTION IS NOT RECOMMENDED. Using this will cause MegaBasterd uploaded folder to appear in your account as NOT DECRYPTABLE. \n\nAt the time of writing this text, there is a method to FIX IT:\n\n1) Move first upload subfolder to the ROOT (CLOUD) folder of your account. \n\n2) Go to account settings and click RELOAD ACCOUNT. \n\nI don't know how long this method will last. USE THIS OPTION AT YOUR OWN RISK.");
|
||||||
public_folder_warning.setWrapStyleWord(true);
|
public_folder_warning.setWrapStyleWord(true);
|
||||||
public_folder_panel.setViewportView(public_folder_warning);
|
public_folder_panel.setViewportView(public_folder_warning);
|
||||||
|
|
||||||
@ -1782,25 +1903,30 @@ public class SettingsDialog extends javax.swing.JDialog {
|
|||||||
zoom_spinner.setFont(new java.awt.Font("Dialog", 0, 18)); // NOI18N
|
zoom_spinner.setFont(new java.awt.Font("Dialog", 0, 18)); // NOI18N
|
||||||
zoom_spinner.setDoubleBuffered(true);
|
zoom_spinner.setDoubleBuffered(true);
|
||||||
|
|
||||||
|
dark_mode_checkbox.setFont(new java.awt.Font("Dialog", 1, 18)); // NOI18N
|
||||||
|
dark_mode_checkbox.setText("DARK MODE");
|
||||||
|
|
||||||
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
|
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
|
||||||
jPanel2.setLayout(jPanel2Layout);
|
jPanel2.setLayout(jPanel2Layout);
|
||||||
jPanel2Layout.setHorizontalGroup(
|
jPanel2Layout.setHorizontalGroup(
|
||||||
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addGroup(jPanel2Layout.createSequentialGroup()
|
.addGroup(jPanel2Layout.createSequentialGroup()
|
||||||
.addContainerGap()
|
.addContainerGap()
|
||||||
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addGroup(jPanel2Layout.createSequentialGroup()
|
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||||
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
.addGroup(jPanel2Layout.createSequentialGroup()
|
||||||
.addComponent(zoom_label)
|
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addComponent(font_label))
|
.addComponent(zoom_label)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
.addComponent(font_label))
|
||||||
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
.addComponent(font_combo, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||||
.addComponent(zoom_spinner, javax.swing.GroupLayout.PREFERRED_SIZE, 351, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
.addComponent(font_combo, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
.addGroup(jPanel2Layout.createSequentialGroup()
|
.addComponent(zoom_spinner, javax.swing.GroupLayout.PREFERRED_SIZE, 351, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||||
.addComponent(jLabel2)
|
.addGroup(jPanel2Layout.createSequentialGroup()
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
.addComponent(jLabel2)
|
||||||
.addComponent(language_combo, javax.swing.GroupLayout.PREFERRED_SIZE, 351, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
|
.addComponent(language_combo, javax.swing.GroupLayout.PREFERRED_SIZE, 351, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||||
|
.addComponent(dark_mode_checkbox))
|
||||||
.addContainerGap())
|
.addContainerGap())
|
||||||
);
|
);
|
||||||
jPanel2Layout.setVerticalGroup(
|
jPanel2Layout.setVerticalGroup(
|
||||||
@ -1818,6 +1944,8 @@ public class SettingsDialog extends javax.swing.JDialog {
|
|||||||
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||||
.addComponent(jLabel2)
|
.addComponent(jLabel2)
|
||||||
.addComponent(language_combo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
.addComponent(language_combo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||||
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
|
.addComponent(dark_mode_checkbox)
|
||||||
.addContainerGap())
|
.addContainerGap())
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -1836,26 +1964,23 @@ public class SettingsDialog extends javax.swing.JDialog {
|
|||||||
.addComponent(run_command_test_button)
|
.addComponent(run_command_test_button)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(run_command_textbox))
|
.addComponent(run_command_textbox))
|
||||||
|
.addComponent(start_frozen_checkbox)
|
||||||
.addGroup(advanced_panelLayout.createSequentialGroup()
|
.addGroup(advanced_panelLayout.createSequentialGroup()
|
||||||
.addGroup(advanced_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
.addComponent(debug_file_checkbox)
|
||||||
.addComponent(start_frozen_checkbox)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addGroup(advanced_panelLayout.createSequentialGroup()
|
.addComponent(debug_file_path))
|
||||||
.addComponent(debug_file_checkbox)
|
.addGroup(advanced_panelLayout.createSequentialGroup()
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addGap(165, 165, 165)
|
||||||
.addComponent(debug_file_path))
|
.addComponent(custom_chunks_dir_current_label))
|
||||||
.addGroup(advanced_panelLayout.createSequentialGroup()
|
.addComponent(rec_zoom_label)
|
||||||
.addGap(165, 165, 165)
|
.addComponent(run_command_checkbox)
|
||||||
.addComponent(custom_chunks_dir_current_label))
|
.addGroup(advanced_panelLayout.createSequentialGroup()
|
||||||
.addComponent(rec_zoom_label)
|
.addComponent(custom_chunks_dir_checkbox)
|
||||||
.addComponent(run_command_checkbox)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addGroup(advanced_panelLayout.createSequentialGroup()
|
.addComponent(custom_chunks_dir_button))
|
||||||
.addComponent(custom_chunks_dir_checkbox)
|
.addGroup(advanced_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addComponent(jPanel1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
.addComponent(custom_chunks_dir_button))
|
.addComponent(jPanel2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
|
||||||
.addGroup(advanced_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
|
|
||||||
.addComponent(jPanel1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
|
||||||
.addComponent(jPanel2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
|
|
||||||
.addGap(0, 0, 0)))
|
|
||||||
.addContainerGap())
|
.addContainerGap())
|
||||||
);
|
);
|
||||||
advanced_panelLayout.setVerticalGroup(
|
advanced_panelLayout.setVerticalGroup(
|
||||||
@ -1996,9 +2121,17 @@ public class SettingsDialog extends javax.swing.JDialog {
|
|||||||
settings.put("thumbnails", thumbnail_checkbox.isSelected() ? "yes" : "no");
|
settings.put("thumbnails", thumbnail_checkbox.isSelected() ? "yes" : "no");
|
||||||
settings.put("upload_log", upload_log_checkbox.isSelected() ? "yes" : "no");
|
settings.put("upload_log", upload_log_checkbox.isSelected() ? "yes" : "no");
|
||||||
settings.put("force_smart_proxy", force_smart_proxy_checkbox.isSelected() ? "yes" : "no");
|
settings.put("force_smart_proxy", force_smart_proxy_checkbox.isSelected() ? "yes" : "no");
|
||||||
|
settings.put("reset_slot_proxy", proxy_reset_slot_checkbox.isSelected() ? "yes" : "no");
|
||||||
|
settings.put("random_proxy", proxy_random_radio.isSelected() ? "yes" : "no");
|
||||||
|
settings.put("dark_mode", dark_mode_checkbox.isSelected() ? "yes" : "no");
|
||||||
settings.put("upload_public_folder", upload_public_folder_checkbox.isSelected() ? "yes" : "no");
|
settings.put("upload_public_folder", upload_public_folder_checkbox.isSelected() ? "yes" : "no");
|
||||||
settings.put("smartproxy_ban_time", String.valueOf(bad_proxy_time_spinner.getValue()));
|
settings.put("smartproxy_ban_time", String.valueOf(bad_proxy_time_spinner.getValue()));
|
||||||
settings.put("smartproxy_timeout", String.valueOf(proxy_timeout_spinner.getValue()));
|
settings.put("smartproxy_timeout", String.valueOf(proxy_timeout_spinner.getValue()));
|
||||||
|
settings.put("smartproxy_autorefresh_time", String.valueOf(auto_refresh_proxy_time_spinner.getValue()));
|
||||||
|
|
||||||
|
if (upload_log_checkbox.isSelected()) {
|
||||||
|
createUploadLogDir();
|
||||||
|
}
|
||||||
|
|
||||||
if (custom_proxy_textarea.getText().trim().length() == 0) {
|
if (custom_proxy_textarea.getText().trim().length() == 0) {
|
||||||
smart_proxy_checkbox.setSelected(false);
|
smart_proxy_checkbox.setSelected(false);
|
||||||
@ -2062,6 +2195,16 @@ public class SettingsDialog extends javax.swing.JDialog {
|
|||||||
|
|
||||||
String zoom = String.valueOf(zoom_spinner.getValue());
|
String zoom = String.valueOf(zoom_spinner.getValue());
|
||||||
|
|
||||||
|
boolean old_dark_mode = false;
|
||||||
|
|
||||||
|
String dark_mode_val = DBTools.selectSettingValue("dark_mode");
|
||||||
|
|
||||||
|
if (dark_mode_val != null) {
|
||||||
|
old_dark_mode = (dark_mode_val.equals("yes"));
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean dark_mode = dark_mode_checkbox.isSelected();
|
||||||
|
|
||||||
boolean old_use_proxy = false;
|
boolean old_use_proxy = false;
|
||||||
|
|
||||||
String use_proxy_val = DBTools.selectSettingValue("use_proxy");
|
String use_proxy_val = DBTools.selectSettingValue("use_proxy");
|
||||||
@ -2135,7 +2278,8 @@ public class SettingsDialog extends javax.swing.JDialog {
|
|||||||
|| !proxy_host.equals(old_proxy_host)
|
|| !proxy_host.equals(old_proxy_host)
|
||||||
|| !proxy_port.equals(old_proxy_port)
|
|| !proxy_port.equals(old_proxy_port)
|
||||||
|| !proxy_user.equals(old_proxy_user)
|
|| !proxy_user.equals(old_proxy_user)
|
||||||
|| !proxy_pass.equals(old_proxy_pass)) {
|
|| !proxy_pass.equals(old_proxy_pass)
|
||||||
|
|| dark_mode != old_dark_mode) {
|
||||||
|
|
||||||
_main_panel.setRestart(true);
|
_main_panel.setRestart(true);
|
||||||
}
|
}
|
||||||
@ -3279,12 +3423,27 @@ public class SettingsDialog extends javax.swing.JDialog {
|
|||||||
|
|
||||||
}//GEN-LAST:event_upload_public_folder_checkboxActionPerformed
|
}//GEN-LAST:event_upload_public_folder_checkboxActionPerformed
|
||||||
|
|
||||||
|
private void proxy_random_radioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_proxy_random_radioActionPerformed
|
||||||
|
// TODO add your handling code here:
|
||||||
|
proxy_random_radio.setSelected(true);
|
||||||
|
proxy_sequential_radio.setSelected(false);
|
||||||
|
|
||||||
|
}//GEN-LAST:event_proxy_random_radioActionPerformed
|
||||||
|
|
||||||
|
private void proxy_sequential_radioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_proxy_sequential_radioActionPerformed
|
||||||
|
// TODO add your handling code here:
|
||||||
|
proxy_sequential_radio.setSelected(true);
|
||||||
|
proxy_random_radio.setSelected(false);
|
||||||
|
|
||||||
|
}//GEN-LAST:event_proxy_sequential_radioActionPerformed
|
||||||
|
|
||||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||||
private javax.swing.JPanel accounts_panel;
|
private javax.swing.JPanel accounts_panel;
|
||||||
private javax.swing.JButton add_elc_account_button;
|
private javax.swing.JButton add_elc_account_button;
|
||||||
private javax.swing.JButton add_mega_account_button;
|
private javax.swing.JButton add_mega_account_button;
|
||||||
private javax.swing.JPanel advanced_panel;
|
private javax.swing.JPanel advanced_panel;
|
||||||
private javax.swing.JScrollPane advanced_scrollpane;
|
private javax.swing.JScrollPane advanced_scrollpane;
|
||||||
|
private javax.swing.JSpinner auto_refresh_proxy_time_spinner;
|
||||||
private javax.swing.JSpinner bad_proxy_time_spinner;
|
private javax.swing.JSpinner bad_proxy_time_spinner;
|
||||||
private javax.swing.JButton cancel_button;
|
private javax.swing.JButton cancel_button;
|
||||||
private javax.swing.JButton change_download_dir_button;
|
private javax.swing.JButton change_download_dir_button;
|
||||||
@ -3294,6 +3453,7 @@ public class SettingsDialog extends javax.swing.JDialog {
|
|||||||
private javax.swing.JLabel custom_chunks_dir_current_label;
|
private javax.swing.JLabel custom_chunks_dir_current_label;
|
||||||
private javax.swing.JLabel custom_proxy_list_label;
|
private javax.swing.JLabel custom_proxy_list_label;
|
||||||
private javax.swing.JTextArea custom_proxy_textarea;
|
private javax.swing.JTextArea custom_proxy_textarea;
|
||||||
|
private javax.swing.JCheckBox dark_mode_checkbox;
|
||||||
private javax.swing.JCheckBox debug_file_checkbox;
|
private javax.swing.JCheckBox debug_file_checkbox;
|
||||||
private javax.swing.JLabel debug_file_path;
|
private javax.swing.JLabel debug_file_path;
|
||||||
private javax.swing.JLabel default_dir_label;
|
private javax.swing.JLabel default_dir_label;
|
||||||
@ -3317,12 +3477,16 @@ public class SettingsDialog extends javax.swing.JDialog {
|
|||||||
private javax.swing.JButton import_settings_button;
|
private javax.swing.JButton import_settings_button;
|
||||||
private javax.swing.JButton jButton1;
|
private javax.swing.JButton jButton1;
|
||||||
private javax.swing.JLabel jLabel1;
|
private javax.swing.JLabel jLabel1;
|
||||||
|
private javax.swing.JLabel jLabel10;
|
||||||
|
private javax.swing.JLabel jLabel11;
|
||||||
private javax.swing.JLabel jLabel2;
|
private javax.swing.JLabel jLabel2;
|
||||||
private javax.swing.JLabel jLabel3;
|
private javax.swing.JLabel jLabel3;
|
||||||
private javax.swing.JLabel jLabel4;
|
private javax.swing.JLabel jLabel4;
|
||||||
private javax.swing.JLabel jLabel5;
|
private javax.swing.JLabel jLabel5;
|
||||||
private javax.swing.JLabel jLabel6;
|
private javax.swing.JLabel jLabel6;
|
||||||
private javax.swing.JLabel jLabel7;
|
private javax.swing.JLabel jLabel7;
|
||||||
|
private javax.swing.JLabel jLabel8;
|
||||||
|
private javax.swing.JLabel jLabel9;
|
||||||
private javax.swing.JPanel jPanel1;
|
private javax.swing.JPanel jPanel1;
|
||||||
private javax.swing.JPanel jPanel2;
|
private javax.swing.JPanel jPanel2;
|
||||||
private javax.swing.JProgressBar jProgressBar1;
|
private javax.swing.JProgressBar jProgressBar1;
|
||||||
@ -3355,6 +3519,9 @@ public class SettingsDialog extends javax.swing.JDialog {
|
|||||||
private javax.swing.JPasswordField proxy_pass_textfield;
|
private javax.swing.JPasswordField proxy_pass_textfield;
|
||||||
private javax.swing.JLabel proxy_port_label;
|
private javax.swing.JLabel proxy_port_label;
|
||||||
private javax.swing.JTextField proxy_port_textfield;
|
private javax.swing.JTextField proxy_port_textfield;
|
||||||
|
private javax.swing.JRadioButton proxy_random_radio;
|
||||||
|
private javax.swing.JCheckBox proxy_reset_slot_checkbox;
|
||||||
|
private javax.swing.JRadioButton proxy_sequential_radio;
|
||||||
private javax.swing.JSpinner proxy_timeout_spinner;
|
private javax.swing.JSpinner proxy_timeout_spinner;
|
||||||
private javax.swing.JLabel proxy_user_label;
|
private javax.swing.JLabel proxy_user_label;
|
||||||
private javax.swing.JTextField proxy_user_textfield;
|
private javax.swing.JTextField proxy_user_textfield;
|
||||||
@ -3364,7 +3531,6 @@ public class SettingsDialog extends javax.swing.JDialog {
|
|||||||
private javax.swing.JLabel rec_download_slots_label;
|
private javax.swing.JLabel rec_download_slots_label;
|
||||||
private javax.swing.JLabel rec_smart_proxy_label;
|
private javax.swing.JLabel rec_smart_proxy_label;
|
||||||
private javax.swing.JLabel rec_smart_proxy_label1;
|
private javax.swing.JLabel rec_smart_proxy_label1;
|
||||||
private javax.swing.JLabel rec_smart_proxy_label2;
|
|
||||||
private javax.swing.JLabel rec_upload_slots_label;
|
private javax.swing.JLabel rec_upload_slots_label;
|
||||||
private javax.swing.JLabel rec_zoom_label;
|
private javax.swing.JLabel rec_zoom_label;
|
||||||
private javax.swing.JButton remove_elc_account_button;
|
private javax.swing.JButton remove_elc_account_button;
|
||||||
|
@ -39,7 +39,10 @@ public final class SmartMegaProxyManager {
|
|||||||
|
|
||||||
public static String DEFAULT_SMART_PROXY_URL = null;
|
public static String DEFAULT_SMART_PROXY_URL = null;
|
||||||
public static final int PROXY_BLOCK_TIME = 300;
|
public static final int PROXY_BLOCK_TIME = 300;
|
||||||
|
public static final int PROXY_AUTO_REFRESH_TIME = 60;
|
||||||
public static final int PROXY_AUTO_REFRESH_SLEEP_TIME = 30;
|
public static final int PROXY_AUTO_REFRESH_SLEEP_TIME = 30;
|
||||||
|
public static final boolean RESET_SLOT_PROXY = true;
|
||||||
|
public static final boolean RANDOM_SELECT = true;
|
||||||
|
|
||||||
private static final Logger LOG = Logger.getLogger(SmartMegaProxyManager.class.getName());
|
private static final Logger LOG = Logger.getLogger(SmartMegaProxyManager.class.getName());
|
||||||
private volatile String _proxy_list_url;
|
private volatile String _proxy_list_url;
|
||||||
@ -49,6 +52,18 @@ public final class SmartMegaProxyManager {
|
|||||||
private volatile int _ban_time;
|
private volatile int _ban_time;
|
||||||
private volatile int _proxy_timeout;
|
private volatile int _proxy_timeout;
|
||||||
private volatile boolean _force_smart_proxy;
|
private volatile boolean _force_smart_proxy;
|
||||||
|
private volatile int _autorefresh_time;
|
||||||
|
private volatile long _last_refresh_timestamp;
|
||||||
|
private volatile boolean _random_select;
|
||||||
|
private volatile boolean _reset_slot_proxy;
|
||||||
|
|
||||||
|
public boolean isRandom_select() {
|
||||||
|
return _random_select;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isReset_slot_proxy() {
|
||||||
|
return _reset_slot_proxy;
|
||||||
|
}
|
||||||
|
|
||||||
public int getProxy_timeout() {
|
public int getProxy_timeout() {
|
||||||
return _proxy_timeout;
|
return _proxy_timeout;
|
||||||
@ -67,6 +82,22 @@ public final class SmartMegaProxyManager {
|
|||||||
|
|
||||||
THREAD_POOL.execute(() -> {
|
THREAD_POOL.execute(() -> {
|
||||||
refreshProxyList();
|
refreshProxyList();
|
||||||
|
|
||||||
|
while (true) {
|
||||||
|
|
||||||
|
while (System.currentTimeMillis() < _last_refresh_timestamp + _autorefresh_time * 60 * 1000) {
|
||||||
|
try {
|
||||||
|
Thread.sleep(1000);
|
||||||
|
} catch (InterruptedException ex) {
|
||||||
|
Logger.getLogger(SmartMegaProxyManager.class.getName()).log(Level.SEVERE, null, ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (MainPanel.isUse_smart_proxy()) {
|
||||||
|
|
||||||
|
refreshProxyList();
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -114,7 +145,33 @@ public final class SmartMegaProxyManager {
|
|||||||
_force_smart_proxy = MainPanel.FORCE_SMART_PROXY;
|
_force_smart_proxy = MainPanel.FORCE_SMART_PROXY;
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG.log(Level.INFO, "SmartProxy BAN_TIME: " + String.valueOf(_ban_time) + " TIMEOUT: " + String.valueOf(_proxy_timeout / 1000) + " FORCE: " + String.valueOf(_force_smart_proxy));
|
String autorefresh_smart_proxy_string = DBTools.selectSettingValue("smartproxy_autorefresh_time");
|
||||||
|
|
||||||
|
if (autorefresh_smart_proxy_string != null) {
|
||||||
|
_autorefresh_time = Integer.parseInt(autorefresh_smart_proxy_string);
|
||||||
|
} else {
|
||||||
|
_autorefresh_time = PROXY_AUTO_REFRESH_TIME;
|
||||||
|
}
|
||||||
|
|
||||||
|
String reset_slot_proxy = DBTools.selectSettingValue("reset_slot_proxy");
|
||||||
|
|
||||||
|
if (reset_slot_proxy != null) {
|
||||||
|
|
||||||
|
_reset_slot_proxy = reset_slot_proxy.equals("yes");
|
||||||
|
} else {
|
||||||
|
_reset_slot_proxy = RESET_SLOT_PROXY;
|
||||||
|
}
|
||||||
|
|
||||||
|
String random_select = DBTools.selectSettingValue("random_proxy");
|
||||||
|
|
||||||
|
if (random_select != null) {
|
||||||
|
|
||||||
|
_random_select = random_select.equals("yes");
|
||||||
|
} else {
|
||||||
|
_random_select = RANDOM_SELECT;
|
||||||
|
}
|
||||||
|
|
||||||
|
LOG.log(Level.INFO, "SmartProxy BAN_TIME: " + String.valueOf(_ban_time) + " TIMEOUT: " + String.valueOf(_proxy_timeout / 1000) + " REFRESH: " + String.valueOf(_autorefresh_time) + " FORCE: " + String.valueOf(_force_smart_proxy) + " RANDOM: " + String.valueOf(_random_select) + " RESET-SLOT-PROXY: " + String.valueOf(_reset_slot_proxy));
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized int getProxyCount() {
|
public synchronized int getProxyCount() {
|
||||||
@ -130,7 +187,9 @@ public final class SmartMegaProxyManager {
|
|||||||
|
|
||||||
List<String> keysList = new ArrayList<>(keys);
|
List<String> keysList = new ArrayList<>(keys);
|
||||||
|
|
||||||
Collections.shuffle(keysList);
|
if (isRandom_select()) {
|
||||||
|
Collections.shuffle(keysList);
|
||||||
|
}
|
||||||
|
|
||||||
Long current_time = System.currentTimeMillis();
|
Long current_time = System.currentTimeMillis();
|
||||||
|
|
||||||
@ -345,6 +404,8 @@ public final class SmartMegaProxyManager {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_last_refresh_timestamp = System.currentTimeMillis();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class SmartProxyAuthenticator extends Authenticator {
|
public static class SmartProxyAuthenticator extends Authenticator {
|
||||||
|
@ -992,7 +992,7 @@ public class Upload implements Transference, Runnable, SecureSingleThreadNotifia
|
|||||||
|
|
||||||
synchronized (this.getMain_panel().getUpload_manager().getLog_file_lock()) {
|
synchronized (this.getMain_panel().getUpload_manager().getLog_file_lock()) {
|
||||||
|
|
||||||
File upload_log = new File(MainPanel.MEGABASTERD_HOME_DIR + "/megabasterd_upload_" + _root_node + ".log");
|
File upload_log = new File(MiscTools.UPLOAD_LOGS_DIR + "/megabasterd_upload_" + _root_node + ".log");
|
||||||
|
|
||||||
if (upload_log.exists()) {
|
if (upload_log.exists()) {
|
||||||
|
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 206 KiB After Width: | Height: | Size: 214 KiB |
Loading…
x
Reference in New Issue
Block a user