Java Code Examples for de.blinkt.openvpn.core.Connection#clone()

The following examples show how to use de.blinkt.openvpn.core.Connection#clone() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: VpnProfile.java    From Cake-VPN with GNU General Public License v2.0 5 votes vote down vote up
@Override
protected VpnProfile clone() throws CloneNotSupportedException {
    VpnProfile copy = (VpnProfile) super.clone();
    copy.mUuid = UUID.randomUUID();
    copy.mConnections = new Connection[mConnections.length];
    int i = 0;
    for (Connection conn : mConnections) {
        copy.mConnections[i++] = conn.clone();
    }
    copy.mAllowedAppsVpn = (HashSet<String>) mAllowedAppsVpn.clone();
    return copy;
}
 
Example 2
Source File: VpnProfile.java    From SimpleOpenVpn-Android with Apache License 2.0 5 votes vote down vote up
@Override
protected VpnProfile clone() throws CloneNotSupportedException {
    VpnProfile copy = (VpnProfile) super.clone();
    copy.mUuid = UUID.randomUUID();
    copy.mConnections = new Connection[mConnections.length];
    int i = 0;
    for (Connection conn : mConnections) {
        copy.mConnections[i++] = conn.clone();
    }
    copy.mAllowedAppsVpn = (HashSet<String>) mAllowedAppsVpn.clone();
    return copy;
}
 
Example 3
Source File: VpnProfile.java    From Cybernet-VPN with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected VpnProfile clone() throws CloneNotSupportedException {
    VpnProfile copy = (VpnProfile) super.clone();
    copy.mUuid = UUID.randomUUID();
    copy.mConnections = new Connection[mConnections.length];
    int i = 0;
    for (Connection conn : mConnections) {
        copy.mConnections[i++] = conn.clone();
    }
    copy.mAllowedAppsVpn = (HashSet<String>) mAllowedAppsVpn.clone();
    return copy;
}
 
Example 4
Source File: VpnProfile.java    From EasyVPN-Free with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected VpnProfile clone() throws CloneNotSupportedException {
    VpnProfile copy = (VpnProfile) super.clone();
    copy.mUuid = UUID.randomUUID();
    copy.mConnections = new Connection[mConnections.length];
    int i = 0;
    for (Connection conn : mConnections) {
        copy.mConnections[i++] = conn.clone();
    }
    copy.mAllowedAppsVpn = (HashSet<String>) mAllowedAppsVpn.clone();
    return copy;
}
 
Example 5
Source File: VpnProfile.java    From android with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected VpnProfile clone() throws CloneNotSupportedException {
    VpnProfile copy = (VpnProfile) super.clone();
    copy.mUuid = UUID.randomUUID();
    copy.mConnections = new Connection[mConnections.length];
    int i = 0;
    for (Connection conn : mConnections) {
        copy.mConnections[i++] = conn.clone();
    }
    copy.mAllowedAppsVpn = (HashSet<String>) mAllowedAppsVpn.clone();
    return copy;
}