-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
dynomake (valeriy)
committed
Sep 2, 2023
1 parent
2586a0e
commit b81c744
Showing
19 changed files
with
111 additions
and
125 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,43 @@ | ||
## | `Shadowsocks (Outline VPN) api wrapper` | ||
Library for working with ShadowSocks remote servers (Outline VPN API) in Java. | ||
### | `Links`: | ||
* [Add as Depend](https://github.com/suuft/shadowsocks-java-wrapper/blob/master/.github/DEPEND.md) | ||
* [Usage Example](https://github.com/suuft/shadowsocks-java-wrapper/blob/master/.github/USAGE.md) | ||
* [Usage Example](https://github.com/dynomake/outline-java-wrapper/blob/master/.github/USAGE.md) | ||
|
||
## | `Add to project:`: | ||
Here is how to add this library depending on your project. | ||
### | `Gradle`: | ||
Repository: | ||
```groovy | ||
maven { | ||
name = "clojars.org" | ||
url = uri("https://repo.clojars.org") | ||
} | ||
``` | ||
Depend: | ||
```groovy | ||
implementation 'io.github.dynomake:outline-java-wrapper:1.0.0' | ||
``` | ||
|
||
### | `Maven`: | ||
|
||
Repository: | ||
|
||
```xml | ||
<repository> | ||
<id>clojars.org</id> | ||
<url>https://repo.clojars.org</url> | ||
</repository> | ||
``` | ||
|
||
Depend: | ||
|
||
```xml | ||
|
||
<dependency> | ||
<groupId>io.github.dynomake</groupId> | ||
<artifactId>outline-java-wrapper</artifactId> | ||
<version>1.0.0</version> | ||
</dependency> | ||
``` | ||
|
||
### | `Donations`: | ||
If you want to support my pet-projects and open-source projects, you always can send me crypro to my USDC wallet address on POLYGON network: `0xAE8840E02C52F4a289af083465d78C2329E6ca7B` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
rootProject.name = 'shadowsocks-java-wrapper' | ||
rootProject.name = 'outline-java-wrapper' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package me.dynomake.outline; | ||
|
||
import lombok.NonNull; | ||
import me.dynomake.outline.implementation.RealOutlineWrapper; | ||
import me.dynomake.outline.model.OutlineKey; | ||
import me.dynomake.outline.model.OutlineKeyList; | ||
import me.dynomake.outline.model.OutlineServer; | ||
|
||
/** | ||
* Shadowsocks Java Wrapper written by dynomake developer. | ||
* Distributed by MIT License. | ||
*/ | ||
public interface OutlineWrapper { | ||
|
||
static OutlineWrapper create(@NonNull String apiAddress) { | ||
return new RealOutlineWrapper(apiAddress); | ||
} | ||
|
||
OutlineKeyList getKeys(); | ||
|
||
OutlineKey generateKey(); | ||
|
||
boolean removeKey(int keyIdentifier); | ||
|
||
OutlineServer getServerInformation(); | ||
|
||
} |
2 changes: 1 addition & 1 deletion
2
.../net/suuft/shadowsocks/gson/GsonUtil.java → ...va/me/dynomake/outline/gson/GsonUtil.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...wsocks/implementation/model/Response.java → ...utline/implementation/model/Response.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...t/suuft/shadowsocks/model/LimitModel.java → ...me/dynomake/outline/model/LimitModel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...t/suuft/shadowsocks/model/OutlineKey.java → ...me/dynomake/outline/model/OutlineKey.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 0 additions & 13 deletions
13
src/main/java/net/suuft/shadowsocks/ShadowsocksFactory.java
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
src/main/java/net/suuft/shadowsocks/ShadowsocksWrapper.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package me.dynomake.outline; | ||
|
||
public class LittleTest { | ||
public static void main(String[] args) { | ||
OutlineWrapper outlineWrapper = OutlineWrapper.create("https://127.0.0.1:50912/api"); | ||
|
||
System.out.println("server: " + outlineWrapper.getServerInformation().name); | ||
System.out.println("in server keys: " + outlineWrapper.getKeys().accessKeys.size()); | ||
int newKeyId = outlineWrapper.generateKey().id; | ||
System.out.println("new key: " + newKeyId); | ||
System.out.println("new key delete result: " + outlineWrapper.removeKey(newKeyId)); | ||
|
||
} | ||
} |
This file was deleted.
Oops, something went wrong.