blob: c646c09938445c1e695989ad843e759f0d5cf90e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
package de.blinkt.openvpn.core.connection;
import se.leap.bitmaskclient.pluggableTransports.ObfsvpnClient;
import se.leap.bitmaskclient.pluggableTransports.models.Obfs4Options;
/**
* Created by cyberta on 08.03.19.
*/
public class Obfs4Connection extends Connection {
private static final String TAG = Obfs4Connection.class.getName();
private Obfs4Options options;
public Obfs4Connection(Obfs4Options options) {
setServerName(ObfsvpnClient.IP);
setServerPort(String.valueOf(ObfsvpnClient.PORT));
setProxyType(ProxyType.NONE);
setUseUdp(true);
setProxyAuthUser(null);
setProxyAuthPassword(null);
setUseProxyAuth(false);
this.options = options;
}
@Override
public Connection clone() throws CloneNotSupportedException {
Obfs4Connection connection = (Obfs4Connection) super.clone();
connection.options = this.options;
return connection;
}
@Override
public TransportType getTransportType() {
return options.transport.getTransportType();
}
public Obfs4Options getObfs4Options() {
return options;
}
}
|