commit
e9e5049a81
|
@ -1,3 +1,4 @@
|
||||||
*.iml
|
*.iml
|
||||||
.idea/
|
.idea/
|
||||||
target/
|
target/
|
||||||
|
.fastRequest
|
|
@ -0,0 +1,2 @@
|
||||||
|
https://account.jetbrains.com/lservice/rpc/validateKey.action
|
||||||
|
116.62.33.138
|
|
@ -1,48 +0,0 @@
|
||||||
import datetime
|
|
||||||
|
|
||||||
from cryptography import x509
|
|
||||||
from cryptography.hazmat.backends import default_backend
|
|
||||||
from cryptography.hazmat.primitives import hashes, serialization
|
|
||||||
from cryptography.hazmat.primitives.asymmetric import rsa
|
|
||||||
from cryptography.x509.oid import NameOID
|
|
||||||
|
|
||||||
one_day = datetime.timedelta(days=1)
|
|
||||||
ten_day = datetime.timedelta(days=3650)
|
|
||||||
today = datetime.datetime.today()
|
|
||||||
yesterday = today - one_day
|
|
||||||
tomorrow = today + ten_day
|
|
||||||
|
|
||||||
private_key = rsa.generate_private_key(
|
|
||||||
public_exponent=65537,
|
|
||||||
key_size=4096,
|
|
||||||
backend=default_backend()
|
|
||||||
)
|
|
||||||
public_key = private_key.public_key()
|
|
||||||
builder = x509.CertificateBuilder()
|
|
||||||
|
|
||||||
builder = builder.subject_name(x509.Name([
|
|
||||||
x509.NameAttribute(NameOID.COMMON_NAME, 'Novice'),
|
|
||||||
]))
|
|
||||||
builder = builder.issuer_name(x509.Name([
|
|
||||||
x509.NameAttribute(NameOID.COMMON_NAME, 'JetProfile CA'),
|
|
||||||
]))
|
|
||||||
builder = builder.not_valid_before(yesterday)
|
|
||||||
builder = builder.not_valid_after(tomorrow)
|
|
||||||
builder = builder.serial_number(x509.random_serial_number())
|
|
||||||
builder = builder.public_key(public_key)
|
|
||||||
|
|
||||||
certificate = builder.sign(
|
|
||||||
private_key=private_key, algorithm=hashes.SHA256(),
|
|
||||||
backend=default_backend()
|
|
||||||
)
|
|
||||||
|
|
||||||
private_bytes = private_key.private_bytes(
|
|
||||||
encoding=serialization.Encoding.PEM,
|
|
||||||
format=serialization.PrivateFormat.TraditionalOpenSSL,
|
|
||||||
encryption_algorithm=serialization.NoEncryption())
|
|
||||||
public_bytes = certificate.public_bytes(
|
|
||||||
encoding=serialization.Encoding.PEM)
|
|
||||||
with open("ca.key", "wb") as fout:
|
|
||||||
fout.write(private_bytes)
|
|
||||||
with open("ca.crt", "wb") as fout:
|
|
||||||
fout.write(public_bytes)
|
|
|
@ -13,8 +13,8 @@
|
||||||
<artifactId>jetbra-agent</artifactId>
|
<artifactId>jetbra-agent</artifactId>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<maven.compiler.source>17</maven.compiler.source>
|
<maven.compiler.source>1.8</maven.compiler.source>
|
||||||
<maven.compiler.target>17</maven.compiler.target>
|
<maven.compiler.target>1.8</maven.compiler.target>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
</properties>
|
</properties>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -29,6 +29,13 @@
|
||||||
<artifactId>byte-buddy-agent</artifactId>
|
<artifactId>byte-buddy-agent</artifactId>
|
||||||
<version>1.14.8</version>
|
<version>1.14.8</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
|
<version>3.3.0</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|
|
@ -11,15 +11,18 @@ public class AgentMain {
|
||||||
public static void premain(String agentArgs, Instrumentation inst) throws Exception {
|
public static void premain(String agentArgs, Instrumentation inst) throws Exception {
|
||||||
printLogo();
|
printLogo();
|
||||||
AgentBuilder agentBuilder = newAgentBuilder();
|
AgentBuilder agentBuilder = newAgentBuilder();
|
||||||
agentBuilder.type(ElementMatchers.named("java.security.cert.PKIXBuilderParameters"))
|
agentBuilder
|
||||||
|
.type(ElementMatchers.named("java.security.cert.PKIXBuilderParameters"))
|
||||||
.transform((builder, typeDescription, classLoader, module, protectionDomain) -> builder
|
.transform((builder, typeDescription, classLoader, module, protectionDomain) -> builder
|
||||||
.visit(Advice.to(PKIXBuilderParametersAdvice.class)
|
.visit(Advice.to(PKIXBuilderParametersAdvice.class)
|
||||||
.on(ElementMatchers.isConstructor().and(ElementMatchers.takesArgument(0, Set.class)))))
|
.on(ElementMatchers.isConstructor().and(ElementMatchers.takesArgument(0, Set.class)))))
|
||||||
.asTerminalTransformation()
|
.asTerminalTransformation()
|
||||||
|
|
||||||
|
|
||||||
.type(ElementMatchers.named("sun.net.www.http.HttpClient"))
|
.type(ElementMatchers.named("sun.net.www.http.HttpClient"))
|
||||||
.transform((builder, typeDescription, classLoader, module, protectionDomain) -> builder
|
.transform((builder, typeDescription, classLoader, module, protectionDomain) -> builder
|
||||||
.visit(Advice.to(HttpClientAdvice.class)
|
.visit(Advice.to(HttpClientAdvice.class)
|
||||||
.on(ElementMatchers.named("openServer"))))
|
.on(ElementMatchers.named("openServer").and(ElementMatchers.takesArgument(0, String.class)))))
|
||||||
.asTerminalTransformation()
|
.asTerminalTransformation()
|
||||||
|
|
||||||
.type(ElementMatchers.named("java.lang.System"))
|
.type(ElementMatchers.named("java.lang.System"))
|
||||||
|
@ -28,12 +31,6 @@ public class AgentMain {
|
||||||
.on(ElementMatchers.named("getProperty"))))
|
.on(ElementMatchers.named("getProperty"))))
|
||||||
.asTerminalTransformation()
|
.asTerminalTransformation()
|
||||||
|
|
||||||
.type(ElementMatchers.named("java.net.Socket"))
|
|
||||||
.transform((builder, typeDescription, classLoader, module, protectionDomain) -> builder
|
|
||||||
.visit(Advice.to(SocketAdvice.class)
|
|
||||||
.on(ElementMatchers.named("connect"))))
|
|
||||||
.asTerminalTransformation()
|
|
||||||
|
|
||||||
.installOn(inst);
|
.installOn(inst);
|
||||||
|
|
||||||
agentBuilder.installOn(inst);
|
agentBuilder.installOn(inst);
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package win.novice.li;
|
package win.novice.li;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileInputStream;
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.security.cert.CertificateFactory;
|
import java.security.cert.CertificateFactory;
|
||||||
import java.security.cert.TrustAnchor;
|
import java.security.cert.TrustAnchor;
|
||||||
|
@ -11,9 +11,9 @@ import java.security.cert.X509Certificate;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
public class TrustAnchorHolder {
|
public class ConfigHelper {
|
||||||
public static Set<TrustAnchor> TRUST_ANCHORS;
|
public static Set<TrustAnchor> TRUST_ANCHORS;
|
||||||
|
public static Set<String> BLOCK_URL_KEYWORDS;
|
||||||
|
|
||||||
public static Set<TrustAnchor> loadTrustAnchors() throws Exception {
|
public static Set<TrustAnchor> loadTrustAnchors() throws Exception {
|
||||||
if (TRUST_ANCHORS != null) {
|
if (TRUST_ANCHORS != null) {
|
||||||
|
@ -22,8 +22,8 @@ public class TrustAnchorHolder {
|
||||||
TRUST_ANCHORS = new HashSet<>();
|
TRUST_ANCHORS = new HashSet<>();
|
||||||
|
|
||||||
String certDir;
|
String certDir;
|
||||||
if (System.getenv("JB_HOME") != null) {
|
if (System.getenv("TRUST_CRT_DIR") != null) {
|
||||||
certDir = System.getenv("JB_HOME");
|
certDir = System.getenv("TRUST_CRT_DIR");
|
||||||
} else {
|
} else {
|
||||||
URI jarURI = getJarURI();
|
URI jarURI = getJarURI();
|
||||||
if (jarURI == null) {
|
if (jarURI == null) {
|
||||||
|
@ -39,7 +39,7 @@ public class TrustAnchorHolder {
|
||||||
CertificateFactory certificateFactory = CertificateFactory.getInstance("X.509");
|
CertificateFactory certificateFactory = CertificateFactory.getInstance("X.509");
|
||||||
for (File item : files) {
|
for (File item : files) {
|
||||||
if (item.getName().endsWith(".crt")) {
|
if (item.getName().endsWith(".crt")) {
|
||||||
X509Certificate cert = (X509Certificate) certificateFactory.generateCertificate(new FileInputStream(item));
|
X509Certificate cert = (X509Certificate) certificateFactory.generateCertificate(Files.newInputStream(item.toPath()));
|
||||||
TRUST_ANCHORS.add(new TrustAnchor(cert, null));
|
TRUST_ANCHORS.add(new TrustAnchor(cert, null));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -49,13 +49,42 @@ public class TrustAnchorHolder {
|
||||||
return TRUST_ANCHORS;
|
return TRUST_ANCHORS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Set<String> loadBlockUrlKeywords() throws Exception {
|
||||||
|
if (BLOCK_URL_KEYWORDS != null) {
|
||||||
|
return BLOCK_URL_KEYWORDS;
|
||||||
|
}
|
||||||
|
BLOCK_URL_KEYWORDS = new HashSet<>();
|
||||||
|
String blockUrlKeywordFilePath;
|
||||||
|
if (System.getenv("BLOCK_URL_KEYWORD_FILE_PATH") != null) {
|
||||||
|
blockUrlKeywordFilePath = System.getenv("BLOCK_URL_KEYWORD_FILE_PATH");
|
||||||
|
} else {
|
||||||
|
URI jarURI = getJarURI();
|
||||||
|
if (jarURI == null) {
|
||||||
|
return BLOCK_URL_KEYWORDS;
|
||||||
|
}
|
||||||
|
blockUrlKeywordFilePath = Paths.get(jarURI).getParent().resolve("block_url_keywords").toString();
|
||||||
|
}
|
||||||
|
System.out.println("load block url keywords from " + blockUrlKeywordFilePath);
|
||||||
|
File file = new File(blockUrlKeywordFilePath);
|
||||||
|
if (file.exists()) {
|
||||||
|
for (String line : Files.readAllLines(file.toPath())) {
|
||||||
|
if (!line.trim().isEmpty()) {
|
||||||
|
BLOCK_URL_KEYWORDS.add(line);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
System.out.println("loaded " + BLOCK_URL_KEYWORDS.size() + " keywords");
|
||||||
|
return BLOCK_URL_KEYWORDS;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public static URI getJarURI() throws Exception {
|
public static URI getJarURI() throws Exception {
|
||||||
URL url = TrustAnchorHolder.class.getProtectionDomain().getCodeSource().getLocation();
|
URL url = ConfigHelper.class.getProtectionDomain().getCodeSource().getLocation();
|
||||||
if (null != url) {
|
if (null != url) {
|
||||||
return url.toURI();
|
return url.toURI();
|
||||||
}
|
}
|
||||||
String resourcePath = "/jarLocation.txt";
|
String resourcePath = "/jarLocation.txt";
|
||||||
url = TrustAnchorHolder.class.getResource(resourcePath);
|
url = ConfigHelper.class.getResource(resourcePath);
|
||||||
if (null == url) {
|
if (null == url) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
|
@ -1,14 +1,26 @@
|
||||||
package win.novice.li;
|
package win.novice.li;
|
||||||
|
|
||||||
import net.bytebuddy.asm.Advice;
|
import net.bytebuddy.asm.Advice;
|
||||||
|
import sun.net.www.http.HttpClient;
|
||||||
|
|
||||||
|
import java.lang.reflect.Field;
|
||||||
|
import java.lang.reflect.Method;
|
||||||
import java.net.SocketTimeoutException;
|
import java.net.SocketTimeoutException;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
|
||||||
public class HttpClientAdvice {
|
public class HttpClientAdvice {
|
||||||
@Advice.OnMethodExit
|
@Advice.OnMethodExit
|
||||||
public static void intercept(@Advice.This Object x) throws Exception {
|
@SuppressWarnings("unchecked")
|
||||||
if (x.toString().contains("validateKey.action")){
|
public static void intercept(@Advice.This Object httpClient) throws Exception {
|
||||||
|
Class<?> clazz = Class.forName("win.novice.li.ConfigHelper", true, ClassLoader.getSystemClassLoader());
|
||||||
|
Method method = clazz.getDeclaredMethod("loadBlockUrlKeywords");
|
||||||
|
Set<String> BLOCK_URL_KEYWORDS = (Set<String>) method.invoke(null);
|
||||||
|
String clientString = httpClient.toString();
|
||||||
|
for (String keyword : BLOCK_URL_KEYWORDS) {
|
||||||
|
if (clientString.contains(keyword)) {
|
||||||
throw new SocketTimeoutException();
|
throw new SocketTimeoutException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ public class PKIXBuilderParametersAdvice {
|
||||||
@Advice.OnMethodEnter
|
@Advice.OnMethodEnter
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public static void intercept(@Advice.Argument(value = 0, readOnly = false) Set<TrustAnchor> trustAnchors) throws Exception {
|
public static void intercept(@Advice.Argument(value = 0, readOnly = false) Set<TrustAnchor> trustAnchors) throws Exception {
|
||||||
Class<?> clazz = Class.forName("win.novice.li.TrustAnchorHolder", true, ClassLoader.getSystemClassLoader());
|
Class<?> clazz = Class.forName("win.novice.li.ConfigHelper", true, ClassLoader.getSystemClassLoader());
|
||||||
Method method = clazz.getDeclaredMethod("loadTrustAnchors");
|
Method method = clazz.getDeclaredMethod("loadTrustAnchors");
|
||||||
Set<TrustAnchor> loadedTrustAnchors = (Set<TrustAnchor>)method.invoke(null);
|
Set<TrustAnchor> loadedTrustAnchors = (Set<TrustAnchor>)method.invoke(null);
|
||||||
HashSet<TrustAnchor> newTrustAnchors = new HashSet<>(trustAnchors);
|
HashSet<TrustAnchor> newTrustAnchors = new HashSet<>(trustAnchors);
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
package win.novice.li;
|
|
||||||
|
|
||||||
import net.bytebuddy.asm.Advice;
|
|
||||||
|
|
||||||
import java.net.ConnectException;
|
|
||||||
import java.net.InetAddress;
|
|
||||||
import java.net.InetSocketAddress;
|
|
||||||
import java.net.SocketAddress;
|
|
||||||
|
|
||||||
public class SocketAdvice {
|
|
||||||
@Advice.OnMethodExit
|
|
||||||
public static void intercept(@Advice.Argument(value = 0,readOnly = false) SocketAddress socketAddress) throws Exception {
|
|
||||||
if (socketAddress instanceof InetSocketAddress){
|
|
||||||
InetAddress address = ((InetSocketAddress) socketAddress).getAddress();
|
|
||||||
if (address.getHostAddress().equals("116.62.33.138")){
|
|
||||||
throw new ConnectException("拒绝连接");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -2,13 +2,15 @@ package win.novice.li;
|
||||||
|
|
||||||
import net.bytebuddy.asm.Advice;
|
import net.bytebuddy.asm.Advice;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
public class SystemAdvice {
|
public class SystemAdvice {
|
||||||
|
|
||||||
|
|
||||||
// System.getProperty
|
// System.getProperty
|
||||||
@Advice.OnMethodExit
|
@Advice.OnMethodExit
|
||||||
public static void intercept(@Advice.Argument(0) Object x, @Advice.Return(readOnly = false) String r) throws Exception {
|
public static void intercept(@Advice.Argument(0) Object x, @Advice.Return(readOnly = false) String r) throws Exception {
|
||||||
if (x.toString().equals("jb.vmOptionsFile")) {
|
if (Objects.equals(x, "jb.vmOptionsFile")) {
|
||||||
RuntimeException exception = new RuntimeException();
|
RuntimeException exception = new RuntimeException();
|
||||||
int nullCnt = 0;
|
int nullCnt = 0;
|
||||||
boolean hasReflect = false;
|
boolean hasReflect = false;
|
||||||
|
|
|
@ -9,28 +9,21 @@
|
||||||
<fileSets>
|
<fileSets>
|
||||||
<fileSet>
|
<fileSet>
|
||||||
<directory>${project.parent.basedir}/script</directory>
|
<directory>${project.parent.basedir}/script</directory>
|
||||||
<outputDirectory>script</outputDirectory>
|
<outputDirectory>jetbra/script</outputDirectory>
|
||||||
<includes>
|
<includes>
|
||||||
<include>*</include>
|
<include>*</include>
|
||||||
</includes>
|
</includes>
|
||||||
</fileSet>
|
</fileSet>
|
||||||
<fileSet>
|
<fileSet>
|
||||||
<directory>${project.parent.basedir}/vmoptions</directory>
|
<directory>${project.parent.basedir}/vmoptions</directory>
|
||||||
<outputDirectory>vmoptions</outputDirectory>
|
<outputDirectory>jetbra/vmoptions</outputDirectory>
|
||||||
<includes>
|
<includes>
|
||||||
<include>*</include>
|
<include>*</include>
|
||||||
</includes>
|
</includes>
|
||||||
</fileSet>
|
</fileSet>
|
||||||
<fileSet>
|
<fileSet>
|
||||||
<directory>${project.parent.basedir}/trust-crt</directory>
|
<directory>${project.parent.basedir}/trust-crt</directory>
|
||||||
<outputDirectory>trust-crt</outputDirectory>
|
<outputDirectory>jetbra/trust-crt</outputDirectory>
|
||||||
<includes>
|
|
||||||
<include>*</include>
|
|
||||||
</includes>
|
|
||||||
</fileSet>
|
|
||||||
<fileSet>
|
|
||||||
<directory>${project.parent.basedir}/trust-crt</directory>
|
|
||||||
<outputDirectory>trust-crt</outputDirectory>
|
|
||||||
<includes>
|
<includes>
|
||||||
<include>*</include>
|
<include>*</include>
|
||||||
</includes>
|
</includes>
|
||||||
|
@ -39,7 +32,11 @@
|
||||||
<files>
|
<files>
|
||||||
<file>
|
<file>
|
||||||
<source>${project.parent.basedir}/jetbra-agent/target/jetbra-agent.jar</source>
|
<source>${project.parent.basedir}/jetbra-agent/target/jetbra-agent.jar</source>
|
||||||
<destName>jetbra-agent.jar</destName>
|
<destName>jetbra/jetbra-agent.jar</destName>
|
||||||
|
</file>
|
||||||
|
<file>
|
||||||
|
<source>${project.parent.basedir}/block_url_keywords</source>
|
||||||
|
<destName>jetbra/block_url_keywords</destName>
|
||||||
</file>
|
</file>
|
||||||
</files>
|
</files>
|
||||||
</assembly>
|
</assembly>
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
<artifactId>jetbra-dist</artifactId>
|
<artifactId>jetbra-dist</artifactId>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<maven.compiler.source>17</maven.compiler.source>
|
<maven.compiler.source>1.8</maven.compiler.source>
|
||||||
<maven.compiler.target>17</maven.compiler.target>
|
<maven.compiler.target>1.8</maven.compiler.target>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
</properties>
|
</properties>
|
||||||
<build>
|
<build>
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
<artifactId>jetbra-server</artifactId>
|
<artifactId>jetbra-server</artifactId>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<maven.compiler.source>17</maven.compiler.source>
|
<maven.compiler.source>1.8</maven.compiler.source>
|
||||||
<maven.compiler.target>17</maven.compiler.target>
|
<maven.compiler.target>1.8</maven.compiler.target>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
|
@ -40,12 +40,12 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.bouncycastle</groupId>
|
<groupId>org.bouncycastle</groupId>
|
||||||
<artifactId>bcpkix-jdk18on</artifactId>
|
<artifactId>bcpkix-jdk18on</artifactId>
|
||||||
<version>1.72</version>
|
<version>1.77</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.bouncycastle</groupId>
|
<groupId>org.bouncycastle</groupId>
|
||||||
<artifactId>bcprov-jdk18on</artifactId>
|
<artifactId>bcprov-jdk18on</artifactId>
|
||||||
<version>1.72</version>
|
<version>1.77</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.projectlombok</groupId>
|
<groupId>org.projectlombok</groupId>
|
||||||
|
|
|
@ -19,6 +19,7 @@ import java.security.*;
|
||||||
import java.security.cert.CertificateFactory;
|
import java.security.cert.CertificateFactory;
|
||||||
import java.security.cert.X509Certificate;
|
import java.security.cert.X509Certificate;
|
||||||
import java.util.Base64;
|
import java.util.Base64;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
|
@ -45,8 +46,7 @@ public class LicenseController {
|
||||||
String sigResultsBase64 = Base64.getEncoder().encodeToString(signatureBytes);
|
String sigResultsBase64 = Base64.getEncoder().encodeToString(signatureBytes);
|
||||||
|
|
||||||
String result = licenseId + "-" + licensePartBase64 + "-" + sigResultsBase64 + "-" + Base64.getEncoder().encodeToString(CRT.getEncoded());
|
String result = licenseId + "-" + licensePartBase64 + "-" + sigResultsBase64 + "-" + Base64.getEncoder().encodeToString(CRT.getEncoded());
|
||||||
|
return Collections.singletonMap("license", result);
|
||||||
return Map.of("license", result);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
package win.novice.li.model;
|
package win.novice.li.model;
|
||||||
|
|
||||||
import jakarta.validation.Valid;
|
|
||||||
import jakarta.validation.constraints.Min;
|
|
||||||
import jakarta.validation.constraints.NotBlank;
|
|
||||||
import jakarta.validation.constraints.NotEmpty;
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.Min;
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -2,10 +2,11 @@
|
||||||
package win.novice.li.model;
|
package win.novice.li.model;
|
||||||
|
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotBlank;
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class Product {
|
public class Product {
|
||||||
@NotBlank
|
@NotBlank
|
||||||
|
|
205
jetbra.js
205
jetbra.js
|
@ -1,9 +1,9 @@
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name JetBra
|
// @name JetBra
|
||||||
// @namespace https://github.com/novice88/jetbra
|
// @namespace https://github.com/novice88/jetbra
|
||||||
// @version 1.1
|
// @version 2.0
|
||||||
// @license MIT
|
// @license MIT
|
||||||
// @description 添加一个按钮,点击获取插件的激活码
|
// @description Add a button on the plugin homepage and click to get the plugin activation code
|
||||||
// @author novice.li
|
// @author novice.li
|
||||||
// @match https://plugins.jetbrains.com/plugin/*
|
// @match https://plugins.jetbrains.com/plugin/*
|
||||||
// @grant GM_setClipboard
|
// @grant GM_setClipboard
|
||||||
|
@ -14,189 +14,19 @@
|
||||||
// @connect localhost
|
// @connect localhost
|
||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
|
|
||||||
var elmGetter = function() {
|
|
||||||
const win = window.unsafeWindow || document.defaultView || window;
|
async function findElementWithRetry(cssSelector) {
|
||||||
const doc = win.document;
|
const maxAttempts = 50;
|
||||||
const listeners = new WeakMap();
|
for (let attempts = 0; attempts < maxAttempts; attempts++) {
|
||||||
let mode = 'css';
|
const element = document.querySelector(cssSelector);
|
||||||
let $;
|
if (element) {
|
||||||
const elProto = win.Element.prototype;
|
return element;
|
||||||
const matches = elProto.matches ||
|
|
||||||
elProto.matchesSelector ||
|
|
||||||
elProto.webkitMatchesSelector ||
|
|
||||||
elProto.mozMatchesSelector ||
|
|
||||||
elProto.oMatchesSelector;
|
|
||||||
const MutationObs = win.MutationObserver ||
|
|
||||||
win.WebkitMutationObserver ||
|
|
||||||
win.MozMutationObserver;
|
|
||||||
function addObserver(target, callback) {
|
|
||||||
const observer = new MutationObs(mutations => {
|
|
||||||
for (const mutation of mutations) {
|
|
||||||
if (mutation.type === 'attributes') {
|
|
||||||
callback(mutation.target);
|
|
||||||
if (observer.canceled) return;
|
|
||||||
}
|
}
|
||||||
for (const node of mutation.addedNodes) {
|
await new Promise(resolve => setTimeout(resolve, 100));
|
||||||
if (node instanceof Element) callback(node);
|
|
||||||
if (observer.canceled) return;
|
|
||||||
}
|
}
|
||||||
}
|
throw new Error(`Element with selector '${cssSelector}' not found after ${maxAttempts} attempts.`);
|
||||||
});
|
}
|
||||||
observer.canceled = false;
|
|
||||||
observer.observe(target, {childList: true, subtree: true, attributes: true});
|
|
||||||
return () => {
|
|
||||||
observer.canceled = true;
|
|
||||||
observer.disconnect();
|
|
||||||
};
|
|
||||||
}
|
|
||||||
function addFilter(target, filter) {
|
|
||||||
let listener = listeners.get(target);
|
|
||||||
if (!listener) {
|
|
||||||
listener = {
|
|
||||||
filters: new Set(),
|
|
||||||
remove: addObserver(target, el => listener.filters.forEach(f => f(el)))
|
|
||||||
};
|
|
||||||
listeners.set(target, listener);
|
|
||||||
}
|
|
||||||
listener.filters.add(filter);
|
|
||||||
}
|
|
||||||
function removeFilter(target, filter) {
|
|
||||||
const listener = listeners.get(target);
|
|
||||||
if (!listener) return;
|
|
||||||
listener.filters.delete(filter);
|
|
||||||
if (!listener.filters.size) {
|
|
||||||
listener.remove();
|
|
||||||
listeners.delete(target);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function query(all, selector, parent, includeParent, curMode) {
|
|
||||||
switch (curMode) {
|
|
||||||
case 'css':
|
|
||||||
const checkParent = includeParent && matches.call(parent, selector);
|
|
||||||
if (all) {
|
|
||||||
const queryAll = parent.querySelectorAll(selector);
|
|
||||||
return checkParent ? [parent, ...queryAll] : [...queryAll];
|
|
||||||
}
|
|
||||||
return checkParent ? parent : parent.querySelector(selector);
|
|
||||||
case 'jquery':
|
|
||||||
let jNodes = $(includeParent ? parent : []);
|
|
||||||
jNodes = jNodes.add([...parent.querySelectorAll('*')]).filter(selector);
|
|
||||||
if (all) return $.map(jNodes, el => $(el));
|
|
||||||
return jNodes.length ? $(jNodes.get(0)) : null;
|
|
||||||
case 'xpath':
|
|
||||||
const ownerDoc = parent.ownerDocument || parent;
|
|
||||||
selector += '/self::*';
|
|
||||||
if (all) {
|
|
||||||
const xPathResult = ownerDoc.evaluate(selector, parent, null, 7, null);
|
|
||||||
const result = [];
|
|
||||||
for (let i = 0; i < xPathResult.snapshotLength; i++) {
|
|
||||||
result.push(xPathResult.snapshotItem(i));
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
return ownerDoc.evaluate(selector, parent, null, 9, null).singleNodeValue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function isJquery(jq) {
|
|
||||||
return jq && jq.fn && typeof jq.fn.jquery === 'string';
|
|
||||||
}
|
|
||||||
function getOne(selector, parent, timeout) {
|
|
||||||
const curMode = mode;
|
|
||||||
return new Promise(resolve => {
|
|
||||||
const node = query(false, selector, parent, false, curMode);
|
|
||||||
if (node) return resolve(node);
|
|
||||||
let timer;
|
|
||||||
const filter = el => {
|
|
||||||
const node = query(false, selector, el, true, curMode);
|
|
||||||
if (node) {
|
|
||||||
removeFilter(parent, filter);
|
|
||||||
timer && clearTimeout(timer);
|
|
||||||
resolve(node);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
addFilter(parent, filter);
|
|
||||||
if (timeout > 0) {
|
|
||||||
timer = setTimeout(() => {
|
|
||||||
removeFilter(parent, filter);
|
|
||||||
resolve(null);
|
|
||||||
}, timeout);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
get currentSelector() {
|
|
||||||
return mode;
|
|
||||||
},
|
|
||||||
get(selector, ...args) {
|
|
||||||
let parent = typeof args[0] !== 'number' && args.shift() || doc;
|
|
||||||
if (mode === 'jquery' && parent instanceof $) parent = parent.get(0);
|
|
||||||
const timeout = args[0] || 0;
|
|
||||||
if (Array.isArray(selector)) {
|
|
||||||
return Promise.all(selector.map(s => getOne(s, parent, timeout)));
|
|
||||||
}
|
|
||||||
return getOne(selector, parent, timeout);
|
|
||||||
},
|
|
||||||
each(selector, ...args) {
|
|
||||||
let parent = typeof args[0] !== 'function' && args.shift() || doc;
|
|
||||||
if (mode === 'jquery' && parent instanceof $) parent = parent.get(0);
|
|
||||||
const callback = args[0];
|
|
||||||
const curMode = mode;
|
|
||||||
const refs = new WeakSet();
|
|
||||||
for (const node of query(true, selector, parent, false, curMode)) {
|
|
||||||
refs.add(curMode === 'jquery' ? node.get(0) : node);
|
|
||||||
if (callback(node, false) === false) return;
|
|
||||||
}
|
|
||||||
const filter = el => {
|
|
||||||
for (const node of query(true, selector, el, true, curMode)) {
|
|
||||||
const _el = curMode === 'jquery' ? node.get(0) : node;
|
|
||||||
if (refs.has(_el)) break;
|
|
||||||
refs.add(_el);
|
|
||||||
if (callback(node, true) === false) {
|
|
||||||
return removeFilter(parent, filter);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
addFilter(parent, filter);
|
|
||||||
},
|
|
||||||
create(domString, ...args) {
|
|
||||||
const returnList = typeof args[0] === 'boolean' && args.shift();
|
|
||||||
const parent = args[0];
|
|
||||||
const template = doc.createElement('template');
|
|
||||||
template.innerHTML = domString;
|
|
||||||
const node = template.content.firstElementChild;
|
|
||||||
if (!node) return null;
|
|
||||||
parent ? parent.appendChild(node) : node.remove();
|
|
||||||
if (returnList) {
|
|
||||||
const list = {};
|
|
||||||
node.querySelectorAll('[id]').forEach(el => list[el.id] = el);
|
|
||||||
list[0] = node;
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
return node;
|
|
||||||
},
|
|
||||||
selector(desc) {
|
|
||||||
switch (true) {
|
|
||||||
case isJquery(desc):
|
|
||||||
$ = desc;
|
|
||||||
return mode = 'jquery';
|
|
||||||
case !desc || typeof desc.toLowerCase !== 'function':
|
|
||||||
return mode = 'css';
|
|
||||||
case desc.toLowerCase() === 'jquery':
|
|
||||||
for (const jq of [window.jQuery, window.$, win.jQuery, win.$]) {
|
|
||||||
if (isJquery(jq)) {
|
|
||||||
$ = jq;
|
|
||||||
break;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
return mode = $ ? 'jquery' : 'css';
|
|
||||||
case desc.toLowerCase() === 'xpath':
|
|
||||||
return mode = 'xpath';
|
|
||||||
default:
|
|
||||||
return mode = 'css';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}();
|
|
||||||
(async function () {
|
(async function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
GM_addStyle(`
|
GM_addStyle(`
|
||||||
|
@ -227,17 +57,16 @@ var elmGetter = function() {
|
||||||
|
|
||||||
let pluginDetail = await fetch('https://plugins.jetbrains.com/api/plugins/' + pluginId).then(r => r.json());
|
let pluginDetail = await fetch('https://plugins.jetbrains.com/api/plugins/' + pluginId).then(r => r.json());
|
||||||
|
|
||||||
const parentElement = await elmGetter.get('.plugin-header__controls-panel > div:first-child');
|
const parentElement = await findElementWithRetry('.plugin-header__controls-panel > div:first-child');
|
||||||
|
|
||||||
let newElement = document.createElement('div');
|
let newElement = document.createElement('div');
|
||||||
newElement.classList.toggle('wt-col-inline');
|
newElement.classList.toggle('wt-col-inline');
|
||||||
newElement.innerHTML = `<button class="jetbra-button" type="button">点击生成激活码</button>`;
|
newElement.innerHTML = `<button class="jetbra-button" type="button">CLICK TO GENERATE ACTIVATION CODE</button>`;
|
||||||
parentElement.appendChild(newElement)
|
parentElement.appendChild(newElement)
|
||||||
|
|
||||||
|
|
||||||
newElement.addEventListener('click', async () => {
|
newElement.addEventListener('click', async () => {
|
||||||
if (pluginDetail.purchaseInfo === undefined) {
|
if (pluginDetail.purchaseInfo === undefined) {
|
||||||
window.alert('此插件不是付费插件');
|
window.alert('This plugin is not a paid plugin in the market');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let data = {
|
let data = {
|
||||||
|
@ -268,7 +97,7 @@ var elmGetter = function() {
|
||||||
onload: function (response) {
|
onload: function (response) {
|
||||||
let license = JSON.parse(response.responseText).license
|
let license = JSON.parse(response.responseText).license
|
||||||
GM_setClipboard(license, 'text');
|
GM_setClipboard(license, 'text');
|
||||||
window.alert('激活码已复制到剪切版');
|
window.alert('The activation code has been copied to your clipboard');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
4
pom.xml
4
pom.xml
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-parent</artifactId>
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
<version>3.2.0</version>
|
<version>2.7.14</version>
|
||||||
<relativePath/>
|
<relativePath/>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>win.novice</groupId>
|
<groupId>win.novice</groupId>
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
<module>jetbra-dist</module>
|
<module>jetbra-dist</module>
|
||||||
</modules>
|
</modules>
|
||||||
<properties>
|
<properties>
|
||||||
<java.version>17</java.version>
|
<java.version>1.8</java.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
19
readme.md
19
readme.md
|
@ -1,12 +1,13 @@
|
||||||
# Jetbra
|
# Jetbra
|
||||||
适用于jetbrains家族产品的一款工具,参照[热老的项目](https://jetbra.in/s)自己写了点代码 ,使用方式与之一致
|
An activation tool for jetbrains family products,including plugins
|
||||||
在替换janetfilter前需要执行janetfilter的卸载脚本
|
|
||||||
|
# Usage
|
||||||
|
|
||||||
|
1. Download jetbra-all.zip from the release page and unzip it
|
||||||
|
2. Execute installation script
|
||||||
|
macOS or Linux: execute "scripts/install.sh"<br>
|
||||||
|
Windows: double click to execute "scripts\install-current-user.vbs" (For current user),"scripts\install-all-users.vbs" (For all users)
|
||||||
|
3. Log in again to load environment variables
|
||||||
|
4. Go to the web page to get the activation code and activate the software
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
新增[油猴脚本](https://greasyfork.org/zh-CN/scripts/480799-jetbra), 使用这个脚本可以生成插件的激活码,需配合该工具使用
|
|
||||||
|
|
||||||
|
|
||||||
todo
|
|
||||||
|
|
||||||
- [ ] 禁止连接某些ip(restful-fast-request--api-buddy等插件不仅会在本地验证license还会将license发往他们自己的服务器进行验证)
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ Sub ProcessVmOptions(ByVal file)
|
||||||
Loop
|
Loop
|
||||||
oFile.Close
|
oFile.Close
|
||||||
|
|
||||||
sNewContent = sNewContent & "-javaagent:" & sJarFile & "=jetbrains"
|
sNewContent = sNewContent & "-javaagent:" & sJarFile
|
||||||
Set oFile = oFS.OpenTextFile(file, 2, 0)
|
Set oFile = oFS.OpenTextFile(file, 2, 0)
|
||||||
oFile.Write sNewContent
|
oFile.Write sNewContent
|
||||||
oFile.Close
|
oFile.Close
|
||||||
|
|
|
@ -45,7 +45,7 @@ Sub ProcessVmOptions(ByVal file)
|
||||||
Loop
|
Loop
|
||||||
oFile.Close
|
oFile.Close
|
||||||
|
|
||||||
sNewContent = sNewContent & "-javaagent:" & sJarFile & "=jetbrains"
|
sNewContent = sNewContent & "-javaagent:" & sJarFile
|
||||||
Set oFile = oFS.OpenTextFile(file, 2, 0)
|
Set oFile = oFS.OpenTextFile(file, 2, 0)
|
||||||
oFile.Write sNewContent
|
oFile.Write sNewContent
|
||||||
oFile.Close
|
oFile.Close
|
||||||
|
|
|
@ -56,7 +56,7 @@ for PRD in $JB_PRODUCTS; do
|
||||||
sed -i '/^\-javaagent:.*[\/\\]jetbra\-agent\.jar.*/d' "${VM_FILE_PATH}"
|
sed -i '/^\-javaagent:.*[\/\\]jetbra\-agent\.jar.*/d' "${VM_FILE_PATH}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "-javaagent:${JAR_FILE_PATH}=jetbrains" >>"${VM_FILE_PATH}"
|
echo "-javaagent:${JAR_FILE_PATH}" >>"${VM_FILE_PATH}"
|
||||||
|
|
||||||
ENV_NAME=$(echo $PRD | tr '[a-z]' '[A-Z]')"_VM_OPTIONS"
|
ENV_NAME=$(echo $PRD | tr '[a-z]' '[A-Z]')"_VM_OPTIONS"
|
||||||
echo "export ${ENV_NAME}=\"${VM_FILE_PATH}\"" >>"${MY_VMOPTIONS_SHELL_FILE}"
|
echo "export ${ENV_NAME}=\"${VM_FILE_PATH}\"" >>"${MY_VMOPTIONS_SHELL_FILE}"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
-Xms128m
|
-Xms512m
|
||||||
-Xmx1024m
|
-Xmx2g
|
||||||
-XX:ReservedCodeCacheSize=512m
|
-XX:ReservedCodeCacheSize=512m
|
||||||
-XX:+IgnoreUnrecognizedVMOptions
|
-XX:+IgnoreUnrecognizedVMOptions
|
||||||
-XX:+UseG1GC
|
-XX:+UseG1GC
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
-Xms128m
|
-Xms512m
|
||||||
-Xmx3992m
|
-Xmx2g
|
||||||
-XX:ReservedCodeCacheSize=512m
|
-XX:ReservedCodeCacheSize=512m
|
||||||
-XX:+IgnoreUnrecognizedVMOptions
|
-XX:+IgnoreUnrecognizedVMOptions
|
||||||
-XX:+UseG1GC
|
-XX:+UseG1GC
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
-Xms128m
|
-Xms256m
|
||||||
-Xmx1024m
|
-Xmx1g
|
||||||
-XX:ReservedCodeCacheSize=512m
|
-XX:ReservedCodeCacheSize=512m
|
||||||
-XX:+IgnoreUnrecognizedVMOptions
|
-XX:+IgnoreUnrecognizedVMOptions
|
||||||
-XX:+UseG1GC
|
-XX:+UseG1GC
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
-Xms128m
|
-Xms256m
|
||||||
-Xmx1024m
|
-Xmx1g
|
||||||
-XX:ReservedCodeCacheSize=512m
|
-XX:ReservedCodeCacheSize=512m
|
||||||
-XX:+IgnoreUnrecognizedVMOptions
|
-XX:+IgnoreUnrecognizedVMOptions
|
||||||
-XX:+UseG1GC
|
-XX:+UseG1GC
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
-Xms128m
|
-Xms256m
|
||||||
-Xmx1024m
|
-Xmx1g
|
||||||
-XX:ReservedCodeCacheSize=512m
|
-XX:ReservedCodeCacheSize=512m
|
||||||
-XX:+IgnoreUnrecognizedVMOptions
|
-XX:+IgnoreUnrecognizedVMOptions
|
||||||
-XX:+UseG1GC
|
-XX:+UseG1GC
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
-Xms128m
|
-Xms256m
|
||||||
-Xmx1024m
|
-Xmx1g
|
||||||
-XX:ReservedCodeCacheSize=512m
|
-XX:ReservedCodeCacheSize=512m
|
||||||
-XX:+IgnoreUnrecognizedVMOptions
|
-XX:+IgnoreUnrecognizedVMOptions
|
||||||
-XX:+UseG1GC
|
-XX:+UseG1GC
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
-Xms128m
|
-Xms512m
|
||||||
-Xmx1024m
|
-Xmx2g
|
||||||
-XX:ReservedCodeCacheSize=512m
|
-XX:ReservedCodeCacheSize=512m
|
||||||
-XX:+IgnoreUnrecognizedVMOptions
|
-XX:+IgnoreUnrecognizedVMOptions
|
||||||
-XX:+UseG1GC
|
-XX:+UseG1GC
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
-Xms128m
|
-Xms512m
|
||||||
-Xmx3992m
|
-Xmx4g
|
||||||
-XX:ReservedCodeCacheSize=512m
|
-XX:ReservedCodeCacheSize=512m
|
||||||
-XX:+IgnoreUnrecognizedVMOptions
|
-XX:+IgnoreUnrecognizedVMOptions
|
||||||
-XX:+UseG1GC
|
-XX:+UseG1GC
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
-Xms128m
|
-Xms256m
|
||||||
-Xmx1024m
|
-Xmx1g
|
||||||
-XX:ReservedCodeCacheSize=512m
|
-XX:ReservedCodeCacheSize=512m
|
||||||
-XX:+IgnoreUnrecognizedVMOptions
|
-XX:+IgnoreUnrecognizedVMOptions
|
||||||
-XX:+UseG1GC
|
-XX:+UseG1GC
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
-Xms128m
|
-Xms256m
|
||||||
-Xmx1024m
|
-Xmx1g
|
||||||
-XX:ReservedCodeCacheSize=512m
|
-XX:ReservedCodeCacheSize=512m
|
||||||
-XX:+IgnoreUnrecognizedVMOptions
|
-XX:+IgnoreUnrecognizedVMOptions
|
||||||
-XX:+UseG1GC
|
-XX:+UseG1GC
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
-Xms128m
|
-Xms256m
|
||||||
-Xmx1024m
|
-Xmx1g
|
||||||
-XX:ReservedCodeCacheSize=512m
|
-XX:ReservedCodeCacheSize=512m
|
||||||
-XX:+IgnoreUnrecognizedVMOptions
|
-XX:+IgnoreUnrecognizedVMOptions
|
||||||
-XX:+UseG1GC
|
-XX:+UseG1GC
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
-Xms128m
|
-Xms256m
|
||||||
-Xmx1024m
|
-Xmx1g
|
||||||
-XX:ReservedCodeCacheSize=512m
|
-XX:ReservedCodeCacheSize=512m
|
||||||
-XX:+IgnoreUnrecognizedVMOptions
|
-XX:+IgnoreUnrecognizedVMOptions
|
||||||
-XX:+UseG1GC
|
-XX:+UseG1GC
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
-Xms128m
|
-Xms256m
|
||||||
-Xmx1024m
|
-Xmx1g
|
||||||
-XX:ReservedCodeCacheSize=512m
|
-XX:ReservedCodeCacheSize=512m
|
||||||
-XX:+IgnoreUnrecognizedVMOptions
|
-XX:+IgnoreUnrecognizedVMOptions
|
||||||
-XX:+UseG1GC
|
-XX:+UseG1GC
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
-Xms128m
|
-Xms256m
|
||||||
-Xmx1024m
|
-Xmx1g
|
||||||
-XX:ReservedCodeCacheSize=512m
|
-XX:ReservedCodeCacheSize=512m
|
||||||
-XX:+IgnoreUnrecognizedVMOptions
|
-XX:+IgnoreUnrecognizedVMOptions
|
||||||
-XX:+UseG1GC
|
-XX:+UseG1GC
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
-Xms128m
|
-Xms256m
|
||||||
-Xmx1024m
|
-Xmx1g
|
||||||
-XX:ReservedCodeCacheSize=512m
|
-XX:ReservedCodeCacheSize=512m
|
||||||
-XX:+IgnoreUnrecognizedVMOptions
|
-XX:+IgnoreUnrecognizedVMOptions
|
||||||
-XX:+UseG1GC
|
-XX:+UseG1GC
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
-Xms128m
|
-Xms256m
|
||||||
-Xmx1024m
|
-Xmx1g
|
||||||
-XX:ReservedCodeCacheSize=512m
|
-XX:ReservedCodeCacheSize=512m
|
||||||
-XX:+IgnoreUnrecognizedVMOptions
|
-XX:+IgnoreUnrecognizedVMOptions
|
||||||
-XX:+UseG1GC
|
-XX:+UseG1GC
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
-Xms128m
|
-Xms256m
|
||||||
-Xmx1024m
|
-Xmx1g
|
||||||
-XX:ReservedCodeCacheSize=512m
|
-XX:ReservedCodeCacheSize=512m
|
||||||
-XX:+IgnoreUnrecognizedVMOptions
|
-XX:+IgnoreUnrecognizedVMOptions
|
||||||
-XX:+UseG1GC
|
-XX:+UseG1GC
|
||||||
|
|
Loading…
Reference in New Issue