Skip to content
This repository was archived by the owner on Nov 24, 2018. It is now read-only.

Commit f2e1e9a

Browse files
authored
Merge pull request #44 from C0mm4nd/master
Ops
2 parents 8f162f1 + 1bd3ff0 commit f2e1e9a

File tree

2 files changed

+30
-28
lines changed

2 files changed

+30
-28
lines changed

src/main/java/me/checkium/vhackapi/Utils.java

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -219,40 +219,12 @@ public String call() {
219219
return null;
220220

221221
}
222-
223-
/**
224-
* Sets a proxy for the system
225-
* @param proxyUrl The proxy's IP/URL
226-
* @param proxyPort The proxy's port
227-
*/
228-
public static void useProxy(String proxyUrl, int proxyPort){
229-
230-
System.setProperty("http.proxyHost", proxyUrl);
231-
System.setProperty("http.proxyPort", String.valueOf(proxyPort));
232-
233-
}
234222

235223
public static <T extends WaitingTask> void setWaitingTask(T wt){
236224

237225
task = wt;
238226

239227
}
240-
241-
/**
242-
* Sets a proxy that requires auth for the system
243-
* @param proxyUrl The proxy's IP/URL
244-
* @param proxyPort The proxy's port
245-
* @param username The proxy's username
246-
* @param password The proxy's password
247-
*/
248-
public static void useProxy(String proxyUrl, int proxyPort, String username, String password){
249-
250-
System.setProperty("http.proxyHost", proxyUrl);
251-
System.setProperty("http.proxyPort", String.valueOf(proxyPort));
252-
System.setProperty("http.proxyUser", username);
253-
System.setProperty("http.proxyPassword", password);
254-
255-
}
256228

257229
private static byte[] m9179a(byte[] arrby, int n2, int n3, byte[] arrby2, int n4, byte[] arrby3) {
258230
int n5 = n3 > 0 ? arrby[n2] << 24 >>> 8 : 0;

src/main/java/me/checkium/vhackapi/vHackAPIBuilder.java

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,36 @@ public class vHackAPIBuilder {
1616
protected String username;
1717
protected String email;
1818

19+
/**
20+
* Sets a proxy for the system
21+
* @param proxyUrl The proxy's IP/URL
22+
* @param proxyPort The proxy's port
23+
*/
24+
public vHackAPIBuilder useProxy(String proxyUrl, int proxyPort){
25+
26+
System.setProperty("http.proxyHost", proxyUrl);
27+
System.setProperty("http.proxyPort", String.valueOf(proxyPort));
28+
return this;
29+
30+
}
31+
32+
/**
33+
* Sets a proxy that requires auth for the system
34+
* @param proxyUrl The proxy's IP/URL
35+
* @param proxyPort The proxy's port
36+
* @param username The proxy's username
37+
* @param password The proxy's password
38+
*/
39+
public vHackAPIBuilder useProxy(String proxyUrl, int proxyPort, String username, String password){
40+
41+
System.setProperty("http.proxyHost", proxyUrl);
42+
System.setProperty("http.proxyPort", String.valueOf(proxyPort));
43+
System.setProperty("http.proxyUser", username);
44+
System.setProperty("http.proxyPassword", password);
45+
return this;
46+
47+
}
48+
1949
public vHackAPIBuilder username(String username) {
2050
this.username = username;
2151
return this;

0 commit comments

Comments
 (0)