Skip to content

Commit

Permalink
New update v2.6
Browse files Browse the repository at this point in the history
1. Some fix
  • Loading branch information
megoRU committed Apr 24, 2023
1 parent a6b64f5 commit 8a506a3
Show file tree
Hide file tree
Showing 4 changed files with 124 additions and 121 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ https://jitpack.io/#megoRU/wg-easy-wrapper
<dependency>
<groupId>com.github.megoRU</groupId>
<artifactId>wg-easy-wrapper</artifactId>
<version>v1.5</version>
<version>v2.6</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>org.megoru</groupId>
<artifactId>wg-easy-wrapper</artifactId>
<version>2.5</version>
<version>2.6</version>

<properties>
<maven.compiler.source>11</maven.compiler.source>
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/org/megoru/impl/WgEasyAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class Builder {
private String domain;
private int port;
private String ip;
private boolean http2;
// private boolean http2;

/**
* This enables LOGS
Expand All @@ -137,10 +137,10 @@ public Builder ip(String ip) {
return this;
}

public Builder enableHTTP2() {
this.http2 = true;
return this;
}
// public Builder enableHTTP2() {
// this.http2 = true;
// return this;
// }

/**
* @param domain It`s domain address with out https://. Example: vpn.megoru.ru
Expand Down Expand Up @@ -169,10 +169,10 @@ public WgEasyAPI build() {
throw new IllegalArgumentException("The provided ip and domain cannot be null!");

if (domain != null && ip == null)
return new WgEasyAPIImpl(password, domain, devMode, http2);
return new WgEasyAPIImpl(password, domain, devMode);

if (port > 0)
return new WgEasyAPIImpl(password, ip, port, devMode, http2);
return new WgEasyAPIImpl(password, ip, port, devMode);

throw new IllegalArgumentException("You a made error");
}
Expand Down
Loading

0 comments on commit 8a506a3

Please sign in to comment.