├── settings.gradle
├── .gitignore
├── app
├── src
│ └── main
│ │ ├── java
│ │ ├── net
│ │ │ └── openvpn
│ │ │ │ └── openvpn
│ │ │ │ ├── ovpncli.java
│ │ │ │ ├── JellyBeanHackBase.java
│ │ │ │ ├── OpenVPNDebug.java
│ │ │ │ ├── BuildConfig.java
│ │ │ │ ├── OpenVPNRebootReceiver.java
│ │ │ │ ├── OpenVPNApplication.java
│ │ │ │ ├── OpenVPNDisconnect.java
│ │ │ │ ├── OpenVPNPrefs.java
│ │ │ │ ├── SWIGTYPE_p_std__string.java
│ │ │ │ ├── Util.java
│ │ │ │ ├── CPUUsage.java
│ │ │ │ ├── SWIGTYPE_p_std__vectorT_std__string_t.java
│ │ │ │ ├── SWIGTYPE_p_std__vectorT_openvpn__ClientAPI__KeyValue_t.java
│ │ │ │ ├── ClientAPI_ExternalPKIBase.java
│ │ │ │ ├── ClientAPI_LogInfo.java
│ │ │ │ ├── OpenVPNHelp.java
│ │ │ │ ├── ClientAPI_ServerEntry.java
│ │ │ │ ├── ClientAPI_SessionToken.java
│ │ │ │ ├── ClientAPI_KeyValue.java
│ │ │ │ ├── ClientAPI_ExternalPKISignRequest.java
│ │ │ │ ├── ClientAPI_ExternalPKICertRequest.java
│ │ │ │ ├── ClientAPI_Status.java
│ │ │ │ ├── OpenVPNAbout.java
│ │ │ │ ├── ClientAPI_Event.java
│ │ │ │ ├── ClientAPI_LLVector.java
│ │ │ │ ├── ClientAPI_RemoteOverride.java
│ │ │ │ ├── ClientAPI_DynamicChallenge.java
│ │ │ │ ├── ClientAPI_ExternalPKIRequestBase.java
│ │ │ │ ├── ClientAPI_ServerEntryVector.java
│ │ │ │ ├── SpinUtil.java
│ │ │ │ ├── ClientAPI_TransportStats.java
│ │ │ │ ├── ClientAPI_MergeConfig.java
│ │ │ │ ├── ClientAPI_InterfaceStats.java
│ │ │ │ ├── ClientAPI_ProvideCreds.java
│ │ │ │ ├── JellyBeanHack.java
│ │ │ │ ├── OpenVPNLog.java
│ │ │ │ ├── OpenVPNAddShortcut.java
│ │ │ │ ├── ClientAPI_ConnectionInfo.java
│ │ │ │ ├── OpenVPNStats.java
│ │ │ │ ├── FileUtil.java
│ │ │ │ ├── OpenVPNAddProxy.java
│ │ │ │ ├── OpenVPNProxyCreds.java
│ │ │ │ └── PrefUtil.java
│ │ └── lib
│ │ │ ├── x86
│ │ │ └── libovpncli.so
│ │ │ ├── arm64-v8a
│ │ │ └── libovpncli.so
│ │ │ └── armeabi-v7a
│ │ │ └── libovpncli.so
│ │ ├── res
│ │ ├── drawable-hdpi-v4
│ │ │ ├── edit.png
│ │ │ ├── icon.png
│ │ │ ├── info.png
│ │ │ ├── pt.png
│ │ │ ├── delete.png
│ │ │ ├── error.png
│ │ │ ├── pause.png
│ │ │ ├── connected.png
│ │ │ ├── connecting.png
│ │ │ ├── rightarrow.png
│ │ │ ├── disconnected.png
│ │ │ ├── file_dialog_file.png
│ │ │ ├── file_dialog_folder.png
│ │ │ ├── openvpn_connected.png
│ │ │ ├── openvpn_disconnected.png
│ │ │ ├── openvpn_notification.png
│ │ │ ├── notification_bg_normal.9.png
│ │ │ ├── notification_bg_low_normal.9.png
│ │ │ ├── notification_bg_low_pressed.9.png
│ │ │ ├── notification_bg_normal_pressed.9.png
│ │ │ └── notify_panel_notification_icon_bg.png
│ │ ├── drawable-ldpi-v4
│ │ │ ├── edit.png
│ │ │ ├── icon.png
│ │ │ ├── info.png
│ │ │ ├── pt.png
│ │ │ ├── delete.png
│ │ │ ├── error.png
│ │ │ ├── pause.png
│ │ │ ├── connected.png
│ │ │ ├── connecting.png
│ │ │ ├── rightarrow.png
│ │ │ ├── disconnected.png
│ │ │ ├── file_dialog_file.png
│ │ │ ├── file_dialog_folder.png
│ │ │ ├── openvpn_connected.png
│ │ │ ├── openvpn_disconnected.png
│ │ │ └── openvpn_notification.png
│ │ ├── drawable-mdpi-v4
│ │ │ ├── edit.png
│ │ │ ├── icon.png
│ │ │ ├── info.png
│ │ │ ├── pt.png
│ │ │ ├── delete.png
│ │ │ ├── error.png
│ │ │ ├── pause.png
│ │ │ ├── connected.png
│ │ │ ├── connecting.png
│ │ │ ├── rightarrow.png
│ │ │ ├── disconnected.png
│ │ │ ├── file_dialog_file.png
│ │ │ ├── file_dialog_folder.png
│ │ │ ├── openvpn_connected.png
│ │ │ ├── openvpn_disconnected.png
│ │ │ ├── openvpn_notification.png
│ │ │ ├── notification_bg_normal.9.png
│ │ │ ├── notification_bg_low_normal.9.png
│ │ │ ├── notification_bg_low_pressed.9.png
│ │ │ ├── notification_bg_normal_pressed.9.png
│ │ │ └── notify_panel_notification_icon_bg.png
│ │ ├── drawable-xhdpi-v4
│ │ │ ├── pt.png
│ │ │ ├── edit.png
│ │ │ ├── error.png
│ │ │ ├── icon.png
│ │ │ ├── info.png
│ │ │ ├── pause.png
│ │ │ ├── delete.png
│ │ │ ├── connected.png
│ │ │ ├── connecting.png
│ │ │ ├── rightarrow.png
│ │ │ ├── disconnected.png
│ │ │ ├── file_dialog_file.png
│ │ │ ├── file_dialog_folder.png
│ │ │ ├── openvpn_connected.png
│ │ │ ├── openvpn_disconnected.png
│ │ │ ├── openvpn_notification.png
│ │ │ ├── notification_bg_normal.9.png
│ │ │ ├── notification_bg_low_normal.9.png
│ │ │ ├── notification_bg_low_pressed.9.png
│ │ │ ├── notification_bg_normal_pressed.9.png
│ │ │ └── notify_panel_notification_icon_bg.png
│ │ ├── drawable-xxhdpi-v4
│ │ │ ├── pt.png
│ │ │ ├── edit.png
│ │ │ ├── icon.png
│ │ │ ├── info.png
│ │ │ ├── delete.png
│ │ │ ├── error.png
│ │ │ ├── pause.png
│ │ │ ├── connected.png
│ │ │ ├── connecting.png
│ │ │ ├── disconnected.png
│ │ │ ├── rightarrow.png
│ │ │ ├── file_dialog_file.png
│ │ │ ├── openvpn_connected.png
│ │ │ ├── file_dialog_folder.png
│ │ │ ├── openvpn_disconnected.png
│ │ │ └── openvpn_notification.png
│ │ ├── drawable-xxxhdpi-v4
│ │ │ ├── pt.png
│ │ │ ├── delete.png
│ │ │ ├── edit.png
│ │ │ ├── error.png
│ │ │ ├── icon.png
│ │ │ ├── info.png
│ │ │ ├── pause.png
│ │ │ ├── connected.png
│ │ │ ├── connecting.png
│ │ │ ├── rightarrow.png
│ │ │ ├── disconnected.png
│ │ │ ├── file_dialog_file.png
│ │ │ ├── file_dialog_folder.png
│ │ │ ├── openvpn_connected.png
│ │ │ ├── openvpn_disconnected.png
│ │ │ └── openvpn_notification.png
│ │ ├── values-port
│ │ │ └── bools.xml
│ │ ├── values-v16
│ │ │ └── dimens.xml
│ │ ├── values
│ │ │ ├── integers.xml
│ │ │ ├── drawables.xml
│ │ │ ├── colors.xml
│ │ │ ├── attrs.xml
│ │ │ ├── arrays.xml
│ │ │ └── dimens.xml
│ │ ├── values-af
│ │ │ └── strings.xml
│ │ ├── values-am
│ │ │ └── strings.xml
│ │ ├── values-ar
│ │ │ └── strings.xml
│ │ ├── values-az
│ │ │ └── strings.xml
│ │ ├── values-bg
│ │ │ └── strings.xml
│ │ ├── values-bn
│ │ │ └── strings.xml
│ │ ├── values-bs
│ │ │ └── strings.xml
│ │ ├── values-ca
│ │ │ └── strings.xml
│ │ ├── values-cs
│ │ │ └── strings.xml
│ │ ├── values-da
│ │ │ └── strings.xml
│ │ ├── values-de
│ │ │ └── strings.xml
│ │ ├── values-el
│ │ │ └── strings.xml
│ │ ├── values-es
│ │ │ └── strings.xml
│ │ ├── values-et
│ │ │ └── strings.xml
│ │ ├── values-eu
│ │ │ └── strings.xml
│ │ ├── values-fa
│ │ │ └── strings.xml
│ │ ├── values-fi
│ │ │ └── strings.xml
│ │ ├── values-fr
│ │ │ └── strings.xml
│ │ ├── values-gl
│ │ │ └── strings.xml
│ │ ├── values-gu
│ │ │ └── strings.xml
│ │ ├── values-hi
│ │ │ └── strings.xml
│ │ ├── values-hr
│ │ │ └── strings.xml
│ │ ├── values-hu
│ │ │ └── strings.xml
│ │ ├── values-hy
│ │ │ └── strings.xml
│ │ ├── values-in
│ │ │ └── strings.xml
│ │ ├── values-is
│ │ │ └── strings.xml
│ │ ├── values-it
│ │ │ └── strings.xml
│ │ ├── values-iw
│ │ │ └── strings.xml
│ │ ├── values-ja
│ │ │ └── strings.xml
│ │ ├── values-ka
│ │ │ └── strings.xml
│ │ ├── values-kk
│ │ │ └── strings.xml
│ │ ├── values-km
│ │ │ └── strings.xml
│ │ ├── values-kn
│ │ │ └── strings.xml
│ │ ├── values-ko
│ │ │ └── strings.xml
│ │ ├── values-ky
│ │ │ └── strings.xml
│ │ ├── values-lo
│ │ │ └── strings.xml
│ │ ├── values-lt
│ │ │ └── strings.xml
│ │ ├── values-lv
│ │ │ └── strings.xml
│ │ ├── values-mk
│ │ │ └── strings.xml
│ │ ├── values-ml
│ │ │ └── strings.xml
│ │ ├── values-mn
│ │ │ └── strings.xml
│ │ ├── values-mr
│ │ │ └── strings.xml
│ │ ├── values-ms
│ │ │ └── strings.xml
│ │ ├── values-my
│ │ │ └── strings.xml
│ │ ├── values-nb
│ │ │ └── strings.xml
│ │ ├── values-ne
│ │ │ └── strings.xml
│ │ ├── values-nl
│ │ │ └── strings.xml
│ │ ├── values-pa
│ │ │ └── strings.xml
│ │ ├── values-pl
│ │ │ └── strings.xml
│ │ ├── values-pt
│ │ │ └── strings.xml
│ │ ├── values-ro
│ │ │ └── strings.xml
│ │ ├── values-ru
│ │ │ └── strings.xml
│ │ ├── values-si
│ │ │ └── strings.xml
│ │ ├── values-sk
│ │ │ └── strings.xml
│ │ ├── values-sl
│ │ │ └── strings.xml
│ │ ├── values-sq
│ │ │ └── strings.xml
│ │ ├── values-sr
│ │ │ └── strings.xml
│ │ ├── values-sv
│ │ │ └── strings.xml
│ │ ├── values-sw
│ │ │ └── strings.xml
│ │ ├── values-ta
│ │ │ └── strings.xml
│ │ ├── values-te
│ │ │ └── strings.xml
│ │ ├── values-th
│ │ │ └── strings.xml
│ │ ├── values-tl
│ │ │ └── strings.xml
│ │ ├── values-tr
│ │ │ └── strings.xml
│ │ ├── values-uk
│ │ │ └── strings.xml
│ │ ├── values-ur
│ │ │ └── strings.xml
│ │ ├── values-uz
│ │ │ └── strings.xml
│ │ ├── values-vi
│ │ │ └── strings.xml
│ │ ├── values-zu
│ │ │ └── strings.xml
│ │ ├── values-b+sr+Latn
│ │ │ └── strings.xml
│ │ ├── values-be
│ │ │ └── strings.xml
│ │ ├── values-en-rAU
│ │ │ └── strings.xml
│ │ ├── values-en-rGB
│ │ │ └── strings.xml
│ │ ├── values-en-rIN
│ │ │ └── strings.xml
│ │ ├── values-es-rUS
│ │ │ └── strings.xml
│ │ ├── values-fr-rCA
│ │ │ └── strings.xml
│ │ ├── values-pt-rBR
│ │ │ └── strings.xml
│ │ ├── values-pt-rPT
│ │ │ └── strings.xml
│ │ ├── values-zh-rCN
│ │ │ └── strings.xml
│ │ ├── values-zh-rHK
│ │ │ └── strings.xml
│ │ ├── values-zh-rTW
│ │ │ └── strings.xml
│ │ ├── values-v21
│ │ │ ├── colors.xml
│ │ │ ├── dimens.xml
│ │ │ └── styles.xml
│ │ ├── layout
│ │ │ ├── jessa.xml
│ │ │ ├── rename_profile_dialog.xml
│ │ │ ├── import_server_item.xml
│ │ │ ├── notification_template_icon_group.xml
│ │ │ ├── notification_template_part_time.xml
│ │ │ ├── notification_template_part_chronometer.xml
│ │ │ ├── cr_dialog.xml
│ │ │ ├── create_shortcut_dialog.xml
│ │ │ ├── stats.xml
│ │ │ ├── notification_action.xml
│ │ │ ├── file_dialog_row.xml
│ │ │ ├── log.xml
│ │ │ ├── notification_action_tombstone.xml
│ │ │ ├── about.xml
│ │ │ ├── proxy_creds.xml
│ │ │ ├── add_shortcut.xml
│ │ │ ├── attachment_receiver.xml
│ │ │ ├── notification_template_custom_big.xml
│ │ │ ├── import_profile.xml
│ │ │ ├── add_proxy.xml
│ │ │ └── file_dialog_main.xml
│ │ ├── drawable
│ │ │ ├── notification_tile_bg.xml
│ │ │ ├── notification_icon_background.xml
│ │ │ ├── notification_bg.xml
│ │ │ ├── info_box.xml
│ │ │ ├── notification_bg_low.xml
│ │ │ ├── profile_box.xml
│ │ │ └── stats_box.xml
│ │ ├── layout-v21
│ │ │ ├── notification_action.xml
│ │ │ ├── notification_template_icon_group.xml
│ │ │ ├── notification_action_tombstone.xml
│ │ │ └── notification_template_custom_big.xml
│ │ ├── layout-v17
│ │ │ ├── notification_action.xml
│ │ │ ├── notification_action_tombstone.xml
│ │ │ └── notification_template_custom_big.xml
│ │ ├── drawable-v21
│ │ │ └── notification_action_background.xml
│ │ ├── menu
│ │ │ └── menu.xml
│ │ ├── xml
│ │ │ └── preferences.xml
│ │ └── layout-v16
│ │ │ └── notification_template_custom_big.xml
│ │ └── AndroidManifest.xml
├── proguard-rules.pro
└── build.gradle
└── README.md
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | bin/
2 | gen/
3 | obj/
4 | libs/*/*.so
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/java/net/openvpn/openvpn/ovpncli.java:
--------------------------------------------------------------------------------
1 | package net.openvpn.openvpn;
2 |
3 | public class ovpncli {
4 | }
5 |
--------------------------------------------------------------------------------
/app/src/main/java/lib/x86/libovpncli.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/java/lib/x86/libovpncli.so
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi-v4/edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-hdpi-v4/edit.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi-v4/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-hdpi-v4/icon.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi-v4/info.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-hdpi-v4/info.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi-v4/pt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-hdpi-v4/pt.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-ldpi-v4/edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-ldpi-v4/edit.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-ldpi-v4/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-ldpi-v4/icon.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-ldpi-v4/info.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-ldpi-v4/info.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-ldpi-v4/pt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-ldpi-v4/pt.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-mdpi-v4/edit.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-mdpi-v4/icon.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/info.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-mdpi-v4/info.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/pt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-mdpi-v4/pt.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/pt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xhdpi-v4/pt.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi-v4/pt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xxhdpi-v4/pt.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi-v4/delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-hdpi-v4/delete.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi-v4/error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-hdpi-v4/error.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi-v4/pause.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-hdpi-v4/pause.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-ldpi-v4/delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-ldpi-v4/delete.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-ldpi-v4/error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-ldpi-v4/error.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-ldpi-v4/pause.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-ldpi-v4/pause.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-mdpi-v4/delete.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-mdpi-v4/error.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/pause.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-mdpi-v4/pause.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xhdpi-v4/edit.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xhdpi-v4/error.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xhdpi-v4/icon.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/info.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xhdpi-v4/info.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/pause.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xhdpi-v4/pause.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi-v4/edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xxhdpi-v4/edit.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi-v4/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xxhdpi-v4/icon.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi-v4/info.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xxhdpi-v4/info.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi-v4/pt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xxxhdpi-v4/pt.png
--------------------------------------------------------------------------------
/app/src/main/java/lib/arm64-v8a/libovpncli.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/java/lib/arm64-v8a/libovpncli.so
--------------------------------------------------------------------------------
/app/src/main/java/lib/armeabi-v7a/libovpncli.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/java/lib/armeabi-v7a/libovpncli.so
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi-v4/connected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-hdpi-v4/connected.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-ldpi-v4/connected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-ldpi-v4/connected.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/connected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-mdpi-v4/connected.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xhdpi-v4/delete.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi-v4/delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xxhdpi-v4/delete.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi-v4/error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xxhdpi-v4/error.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi-v4/pause.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xxhdpi-v4/pause.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi-v4/delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xxxhdpi-v4/delete.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi-v4/edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xxxhdpi-v4/edit.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi-v4/error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xxxhdpi-v4/error.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi-v4/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xxxhdpi-v4/icon.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi-v4/info.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xxxhdpi-v4/info.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi-v4/pause.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xxxhdpi-v4/pause.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi-v4/connecting.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-hdpi-v4/connecting.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi-v4/rightarrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-hdpi-v4/rightarrow.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-ldpi-v4/connecting.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-ldpi-v4/connecting.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-ldpi-v4/rightarrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-ldpi-v4/rightarrow.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/connecting.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-mdpi-v4/connecting.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/rightarrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-mdpi-v4/rightarrow.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/connected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xhdpi-v4/connected.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/connecting.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xhdpi-v4/connecting.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/rightarrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xhdpi-v4/rightarrow.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi-v4/connected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xxhdpi-v4/connected.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi-v4/disconnected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-hdpi-v4/disconnected.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-ldpi-v4/disconnected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-ldpi-v4/disconnected.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/disconnected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-mdpi-v4/disconnected.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/disconnected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xhdpi-v4/disconnected.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi-v4/connecting.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xxhdpi-v4/connecting.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi-v4/disconnected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xxhdpi-v4/disconnected.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi-v4/rightarrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xxhdpi-v4/rightarrow.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi-v4/connected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xxxhdpi-v4/connected.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi-v4/connecting.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xxxhdpi-v4/connecting.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi-v4/rightarrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xxxhdpi-v4/rightarrow.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi-v4/file_dialog_file.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-hdpi-v4/file_dialog_file.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-ldpi-v4/file_dialog_file.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-ldpi-v4/file_dialog_file.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/file_dialog_file.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-mdpi-v4/file_dialog_file.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi-v4/disconnected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xxxhdpi-v4/disconnected.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi-v4/file_dialog_folder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-hdpi-v4/file_dialog_folder.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi-v4/openvpn_connected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-hdpi-v4/openvpn_connected.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-ldpi-v4/file_dialog_folder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-ldpi-v4/file_dialog_folder.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-ldpi-v4/openvpn_connected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-ldpi-v4/openvpn_connected.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/file_dialog_folder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-mdpi-v4/file_dialog_folder.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/openvpn_connected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-mdpi-v4/openvpn_connected.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/file_dialog_file.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xhdpi-v4/file_dialog_file.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/file_dialog_folder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xhdpi-v4/file_dialog_folder.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/openvpn_connected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xhdpi-v4/openvpn_connected.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi-v4/file_dialog_file.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xxhdpi-v4/file_dialog_file.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi-v4/openvpn_connected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xxhdpi-v4/openvpn_connected.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi-v4/file_dialog_file.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xxxhdpi-v4/file_dialog_file.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi-v4/openvpn_disconnected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-hdpi-v4/openvpn_disconnected.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi-v4/openvpn_notification.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-hdpi-v4/openvpn_notification.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-ldpi-v4/openvpn_disconnected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-ldpi-v4/openvpn_disconnected.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-ldpi-v4/openvpn_notification.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-ldpi-v4/openvpn_notification.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/openvpn_disconnected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-mdpi-v4/openvpn_disconnected.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/openvpn_notification.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-mdpi-v4/openvpn_notification.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/openvpn_disconnected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xhdpi-v4/openvpn_disconnected.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/openvpn_notification.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xhdpi-v4/openvpn_notification.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi-v4/file_dialog_folder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xxhdpi-v4/file_dialog_folder.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi-v4/file_dialog_folder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xxxhdpi-v4/file_dialog_folder.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi-v4/openvpn_connected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xxxhdpi-v4/openvpn_connected.png
--------------------------------------------------------------------------------
/app/src/main/res/values-port/bools.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | false
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi-v4/notification_bg_normal.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-hdpi-v4/notification_bg_normal.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/notification_bg_normal.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-mdpi-v4/notification_bg_normal.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi-v4/openvpn_disconnected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xxhdpi-v4/openvpn_disconnected.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi-v4/openvpn_notification.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xxhdpi-v4/openvpn_notification.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi-v4/openvpn_disconnected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xxxhdpi-v4/openvpn_disconnected.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi-v4/openvpn_notification.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xxxhdpi-v4/openvpn_notification.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/notification_bg_normal.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xhdpi-v4/notification_bg_normal.9.png
--------------------------------------------------------------------------------
/app/src/main/res/values-v16/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 4.0dip
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values/integers.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi-v4/notification_bg_low_normal.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-hdpi-v4/notification_bg_low_normal.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi-v4/notification_bg_low_pressed.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-hdpi-v4/notification_bg_low_pressed.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/notification_bg_low_normal.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-mdpi-v4/notification_bg_low_normal.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/notification_bg_low_pressed.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-mdpi-v4/notification_bg_low_pressed.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/notification_bg_low_normal.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xhdpi-v4/notification_bg_low_normal.9.png
--------------------------------------------------------------------------------
/app/src/main/res/values-af/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-am/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-ar/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | +999
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-az/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-bg/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-bn/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | ৯৯৯+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-bs/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | >999
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-ca/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | +999
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-cs/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-da/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-de/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-el/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-es/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | +999
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-et/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-eu/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-fa/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | ۹۹۹+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-fi/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-fr/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | >999
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-gl/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | >999
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-gu/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-hi/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-hr/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-hu/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-hy/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-in/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-is/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-it/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-iw/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-ja/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-ka/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-kk/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-km/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-kn/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-ko/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-ky/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-lo/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-lt/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-lv/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-mk/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-ml/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-mn/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-mr/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-ms/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-my/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | ၉၉၉+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-nb/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-ne/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | ९९९+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-nl/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-pa/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-pl/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-pt/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-ro/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | ˃999
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-ru/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | >999
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-si/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-sk/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-sl/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-sq/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-sr/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | >999
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-sv/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | >999
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-sw/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-ta/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-te/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-th/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-tl/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-tr/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-uk/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-ur/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-uz/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-vi/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-zu/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/notification_bg_low_pressed.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xhdpi-v4/notification_bg_low_pressed.9.png
--------------------------------------------------------------------------------
/app/src/main/res/values-b+sr+Latn/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | >999
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-be/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | больш за 999
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-en-rAU/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-en-rGB/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-en-rIN/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-es-rUS/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-fr-rCA/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | >999
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-pt-rBR/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-pt-rPT/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | +999
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-zh-rCN/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-zh-rHK/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999 +
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-zh-rTW/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 999+
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/java/net/openvpn/openvpn/JellyBeanHackBase.java:
--------------------------------------------------------------------------------
1 | package net.openvpn.openvpn;
2 |
3 | public class JellyBeanHackBase {
4 | protected static final boolean ENABLED = true;
5 | }
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi-v4/notification_bg_normal_pressed.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-hdpi-v4/notification_bg_normal_pressed.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi-v4/notify_panel_notification_icon_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-hdpi-v4/notify_panel_notification_icon_bg.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/notification_bg_normal_pressed.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-mdpi-v4/notification_bg_normal_pressed.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v4/notify_panel_notification_icon_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-mdpi-v4/notify_panel_notification_icon_bg.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/notification_bg_normal_pressed.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xhdpi-v4/notification_bg_normal_pressed.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v4/notify_panel_notification_icon_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/raksss/OpenVPNLite/HEAD/app/src/main/res/drawable-xhdpi-v4/notify_panel_notification_icon_bg.png
--------------------------------------------------------------------------------
/app/src/main/res/values-v21/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | @color/secondary_text_default_material_light
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/jessa.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/java/net/openvpn/openvpn/OpenVPNDebug.java:
--------------------------------------------------------------------------------
1 | package net.openvpn.openvpn;
2 |
3 | class OpenVPNDebug {
4 | OpenVPNDebug() {
5 | }
6 |
7 | public static String pw_repl(String user, String pw) {
8 | return pw;
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/notification_tile_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/values/drawables.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | - #3333b5e5
4 | - #0cffffff
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/notification_icon_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/rename_profile_dialog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-v21/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 0.0dip
4 | 0.0dip
5 | 12.0dip
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/import_server_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/notification_template_icon_group.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/notification_template_part_time.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/notification_template_part_chronometer.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #ffffffff
4 | #ffff0000
5 | #ff9e9e9e
6 | #1f000000
7 | #8a000000
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/cr_dialog.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/create_shortcut_dialog.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/notification_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/java/net/openvpn/openvpn/BuildConfig.java:
--------------------------------------------------------------------------------
1 | package net.openvpn.openvpn;
2 |
3 | public final class BuildConfig
4 | {
5 | public static final String APPLICATION_ID = "net.openvpn.openvpn";
6 | public static final String BUILD_TYPE = "release";
7 | public static final boolean DEBUG = false;
8 | public static final String FLAVOR = "";
9 | public static final int VERSION_CODE = 96;
10 | public static final String VERSION_NAME = "1.1.27";
11 | }
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/info_box.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
8 |
13 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/notification_bg_low.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/profile_box.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
8 |
13 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/stats_box.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
8 |
13 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/java/net/openvpn/openvpn/OpenVPNRebootReceiver.java:
--------------------------------------------------------------------------------
1 | package net.openvpn.openvpn;
2 |
3 | import android.content.BroadcastReceiver;
4 | import android.content.Context;
5 | import android.content.Intent;
6 |
7 | public class OpenVPNRebootReceiver extends BroadcastReceiver {
8 | private static final String TAG = "OpenVPNRebootReceiver";
9 |
10 | public void onReceive(Context context, Intent intent) {
11 | OpenVPNClientBase.autostart(context);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/app/src/main/java/net/openvpn/openvpn/OpenVPNApplication.java:
--------------------------------------------------------------------------------
1 | package net.openvpn.openvpn;
2 |
3 | import android.app.Application;
4 | import android.content.Context;
5 |
6 | public class OpenVPNApplication extends Application {
7 | public static Context context;
8 |
9 | public void onCreate() {
10 | super.onCreate();
11 | context = getApplicationContext();
12 | }
13 |
14 | public static String resString(int res_id) {
15 | return context.getString(res_id);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/app/src/main/java/net/openvpn/openvpn/OpenVPNDisconnect.java:
--------------------------------------------------------------------------------
1 | package net.openvpn.openvpn;
2 |
3 | import android.os.Bundle;
4 | import android.util.Log;
5 |
6 | public class OpenVPNDisconnect extends OpenVPNClientBase {
7 | private static final String TAG = "OpenVPNDisconnect";
8 |
9 | public void onCreate(Bundle savedInstanceState) {
10 | super.onCreate(savedInstanceState);
11 | Log.d(TAG, "disconnect");
12 | submitDisconnectIntent(false);
13 | finish();
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/app/src/main/java/net/openvpn/openvpn/OpenVPNPrefs.java:
--------------------------------------------------------------------------------
1 | package net.openvpn.openvpn;
2 |
3 | import android.os.Bundle;
4 | import android.preference.PreferenceActivity;
5 |
6 | public class OpenVPNPrefs extends PreferenceActivity {
7 | public void onCreate(Bundle savedInstanceState) {
8 | if (OpenVPNClientBase.themeSet) {
9 | setTheme(OpenVPNClientBase.themeResId);
10 | }
11 | super.onCreate(savedInstanceState);
12 | addPreferencesFromResource(R.xml.preferences);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/app/src/main/java/net/openvpn/openvpn/SWIGTYPE_p_std__string.java:
--------------------------------------------------------------------------------
1 | package net.openvpn.openvpn;
2 |
3 | public class SWIGTYPE_p_std__string {
4 | private transient long swigCPtr;
5 |
6 | protected SWIGTYPE_p_std__string(long cPtr, boolean futureUse) {
7 | this.swigCPtr = cPtr;
8 | }
9 |
10 | protected SWIGTYPE_p_std__string() {
11 | this.swigCPtr = 0;
12 | }
13 |
14 | protected static long getCPtr(SWIGTYPE_p_std__string obj) {
15 | return obj == null ? 0 : obj.swigCPtr;
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/app/src/main/java/net/openvpn/openvpn/Util.java:
--------------------------------------------------------------------------------
1 | package net.openvpn.openvpn;
2 |
3 | public class Util {
4 | private static final char[] hexArray = "0123456789ABCDEF".toCharArray();
5 |
6 | public static String bytesToHex(byte[] bytes) {
7 | char[] hexChars = new char[(bytes.length * 2)];
8 | for (int j = 0; j < bytes.length; j++) {
9 | int v = bytes[j] & 255;
10 | hexChars[j * 2] = hexArray[v >>> 4];
11 | hexChars[(j * 2) + 1] = hexArray[v & 15];
12 | }
13 | return new String(hexChars);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/stats.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/java/net/openvpn/openvpn/CPUUsage.java:
--------------------------------------------------------------------------------
1 | package net.openvpn.openvpn;
2 |
3 | public class CPUUsage {
4 | private double end_time = 0.0d;
5 | private boolean halted = false;
6 | private double start_time = cpu_usage();
7 |
8 | private static native double cpu_usage();
9 |
10 | public double usage() {
11 | return (this.halted ? this.end_time : cpu_usage()) - this.start_time;
12 | }
13 |
14 | public void stop() {
15 | if (!this.halted) {
16 | this.end_time = cpu_usage();
17 | this.halted = true;
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/app/src/main/java/net/openvpn/openvpn/SWIGTYPE_p_std__vectorT_std__string_t.java:
--------------------------------------------------------------------------------
1 | package net.openvpn.openvpn;
2 |
3 | public class SWIGTYPE_p_std__vectorT_std__string_t {
4 | private transient long swigCPtr;
5 |
6 | protected SWIGTYPE_p_std__vectorT_std__string_t(long cPtr, boolean futureUse) {
7 | this.swigCPtr = cPtr;
8 | }
9 |
10 | protected SWIGTYPE_p_std__vectorT_std__string_t() {
11 | this.swigCPtr = 0;
12 | }
13 |
14 | protected static long getCPtr(SWIGTYPE_p_std__vectorT_std__string_t obj) {
15 | return obj == null ? 0 : obj.swigCPtr;
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/app/src/main/java/net/openvpn/openvpn/SWIGTYPE_p_std__vectorT_openvpn__ClientAPI__KeyValue_t.java:
--------------------------------------------------------------------------------
1 | package net.openvpn.openvpn;
2 |
3 | public class SWIGTYPE_p_std__vectorT_openvpn__ClientAPI__KeyValue_t {
4 | private transient long swigCPtr;
5 |
6 | protected SWIGTYPE_p_std__vectorT_openvpn__ClientAPI__KeyValue_t(long cPtr, boolean futureUse) {
7 | this.swigCPtr = cPtr;
8 | }
9 |
10 | protected SWIGTYPE_p_std__vectorT_openvpn__ClientAPI__KeyValue_t() {
11 | this.swigCPtr = 0;
12 | }
13 |
14 | protected static long getCPtr(SWIGTYPE_p_std__vectorT_openvpn__ClientAPI__KeyValue_t obj) {
15 | return obj == null ? 0 : obj.swigCPtr;
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/app/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # OpenVPNLite
2 | for professionals purposes only
3 |
4 | Credits:
5 | 1. openvpn.net
6 | 2. Renzo Lanes Barba
7 | 3. and Unknown Developer
8 | 4. Alliance Team
9 | 5. Raksss
10 |
11 | Special Thanks to the fallowing tools
12 |
13 | 1. apktool
14 | 2. dex2jar
15 | 3. DJ Java Decompiler
16 | 4. eclipse
17 | 5. Android Studio
18 | 6. APK Studio
19 | 7. Smali2JavaUI
20 | 8. jd-gui
21 | 9. AndroChef Java Decompiler
22 | 10. My Brain
23 |
24 | Download Here
25 | https://play.google.com/store/apps/details?id=net.openvpn.openvpn
26 |
27 | Website
28 | http://raksss.com/
29 |
30 | Facebook
31 | https://www.facebook.com/profile.php?id=100009354416601
32 |
33 | Facebook Page
34 | https://www.facebook.com/groups/raksssdotcom/
35 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in C:\tools\adt-bundle-windows-x86_64-20131030\sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 26
5 | buildToolsVersion "8.0.0"
6 |
7 | defaultConfig {
8 | applicationId "net.openvpn.openvpn"
9 | minSdkVersion 14
10 | targetSdkVersion 26
11 | versionCode 96
12 | versionName "1.1.27"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | }
21 |
22 | dependencies {
23 | compile 'com.android.support:support-v4:+'
24 | compile 'com.android.support:support-annotations:+'
25 | compile 'com.android.support:support-compat:+'
26 | compile fileTree(dir: 'libs', include: ['*.jar'])
27 | }
28 |
--------------------------------------------------------------------------------
/app/src/main/res/layout-v21/notification_action.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/notification_action.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/file_dialog_row.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
17 |
18 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/app/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/layout-v17/notification_action.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/layout-v21/notification_template_icon_group.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v21/notification_action_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/layout-v21/notification_action_tombstone.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/log.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/notification_action_tombstone.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/java/net/openvpn/openvpn/ClientAPI_ExternalPKIBase.java:
--------------------------------------------------------------------------------
1 | package net.openvpn.openvpn;
2 |
3 | public class ClientAPI_ExternalPKIBase {
4 | protected transient boolean swigCMemOwn;
5 | private transient long swigCPtr;
6 |
7 | protected ClientAPI_ExternalPKIBase(long cPtr, boolean cMemoryOwn) {
8 | this.swigCMemOwn = cMemoryOwn;
9 | this.swigCPtr = cPtr;
10 | }
11 |
12 | protected static long getCPtr(ClientAPI_ExternalPKIBase obj) {
13 | return obj == null ? 0 : obj.swigCPtr;
14 | }
15 |
16 | protected void finalize() {
17 | delete();
18 | }
19 |
20 | public synchronized void delete() {
21 | if (this.swigCPtr != 0) {
22 | if (this.swigCMemOwn) {
23 | this.swigCMemOwn = false;
24 | ovpncliJNI.delete_ClientAPI_ExternalPKIBase(this.swigCPtr);
25 | }
26 | this.swigCPtr = 0;
27 | }
28 | }
29 |
30 | public boolean sign(String data, SWIGTYPE_p_std__string sig) {
31 | return ovpncliJNI.ClientAPI_ExternalPKIBase_sign(this.swigCPtr, this, data, SWIGTYPE_p_std__string.getCPtr(sig));
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/app/src/main/res/layout-v17/notification_action_tombstone.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/about.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
14 |
15 |
18 |
19 |
21 |
22 |
25 |
26 |
27 |
28 |
32 |
33 |
37 |
38 |
39 |
40 |
46 |
47 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/app/src/main/java/net/openvpn/openvpn/ClientAPI_LogInfo.java:
--------------------------------------------------------------------------------
1 | package net.openvpn.openvpn;
2 |
3 | public class ClientAPI_LogInfo {
4 | protected transient boolean swigCMemOwn;
5 | private transient long swigCPtr;
6 |
7 | protected ClientAPI_LogInfo(long cPtr, boolean cMemoryOwn) {
8 | this.swigCMemOwn = cMemoryOwn;
9 | this.swigCPtr = cPtr;
10 | }
11 |
12 | protected static long getCPtr(ClientAPI_LogInfo obj) {
13 | return obj == null ? 0 : obj.swigCPtr;
14 | }
15 |
16 | protected void finalize() {
17 | delete();
18 | }
19 |
20 | public synchronized void delete() {
21 | if (this.swigCPtr != 0) {
22 | if (this.swigCMemOwn) {
23 | this.swigCMemOwn = false;
24 | ovpncliJNI.delete_ClientAPI_LogInfo(this.swigCPtr);
25 | }
26 | this.swigCPtr = 0;
27 | }
28 | }
29 |
30 | public ClientAPI_LogInfo() {
31 | this(ovpncliJNI.new_ClientAPI_LogInfo__SWIG_0(), true);
32 | }
33 |
34 | public ClientAPI_LogInfo(String str) {
35 | this(ovpncliJNI.new_ClientAPI_LogInfo__SWIG_1(str), true);
36 | }
37 |
38 | public void setText(String value) {
39 | ovpncliJNI.ClientAPI_LogInfo_text_set(this.swigCPtr, this, value);
40 | }
41 |
42 | public String getText() {
43 | return ovpncliJNI.ClientAPI_LogInfo_text_get(this.swigCPtr, this);
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/app/src/main/res/values/arrays.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | - No
- Full
- Downlink only
4 | - no
- yes
- asym
5 | - 15 seconds
- 30 seconds
- 1 minute
- 2 minutes
- Continuously retry
6 | - 15
- 30
- 60
- 120
- 0
7 | - Combined IPv4/IPv6 tunnel
- IPv4-only tunnel
- No preference
8 | - yes
- no
- default
9 | - Disabled
- Profile Default
- TLS 1.0
- TLS 1.1
- TLS 1.2
10 | - disabled
- default
- tls_1_0
- tls_1_1
- tls_1_2
11 | - Adaptive
- UDP
- TCP
12 | - adaptive
- udp
- tcp
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 2.0dip
4 | 8.0dip
5 | 10.0dip
6 | - @dimen/notification_content_margin_start
7 | 4.0dip
8 | 6.0dip
9 | 8.0dip
10 | 4.0dip
11 | 2.0dip
12 | 32.0dip
13 | 13.0sp
14 | 12.0dip
15 | 64.0dip
16 | 64.0dip
17 | 16.0dip
18 | 3.0dip
19 | 24.0dip
20 | 13.0sp
21 | 10.0dip
22 | 5.0dip
23 |
24 |
--------------------------------------------------------------------------------
/app/src/main/java/net/openvpn/openvpn/OpenVPNHelp.java:
--------------------------------------------------------------------------------
1 | package net.openvpn.openvpn;
2 |
3 | import android.os.Bundle;
4 | import android.util.Log;
5 | import android.webkit.WebView;
6 | import java.io.IOException;
7 | import java.util.Locale;
8 |
9 | public class OpenVPNHelp extends OpenVPNClientBase {
10 | private static final String TAG = "OpenVPNHelp";
11 |
12 | public void onCreate(Bundle savedInstanceState) {
13 | String help_content;
14 | super.onCreate(savedInstanceState);
15 | String language = Locale.getDefault().getLanguage();
16 | String help_dir = String.format("help/%s", new Object[]{language});
17 | Log.d(TAG, String.format("Localized help directory: %s", new Object[]{help_dir}));
18 | try {
19 | help_content = FileUtil.readAsset(this, String.format("%s/index.html", new Object[]{help_dir}));
20 | } catch (IOException e) {
21 | help_content = null;
22 | help_dir = "help/default";
23 | }
24 | if (help_content == null) {
25 | try {
26 | help_content = FileUtil.readAsset(this, String.format("%s/index.html", new Object[]{help_dir}));
27 | } catch (IOException e2) {
28 | Log.e(TAG, "error reading help file", e2);
29 | finish();
30 | }
31 | }
32 | WebView webview = new WebView(this);
33 | webview.getSettings().setBuiltInZoomControls(true);
34 | setContentView(webview);
35 | webview.loadData(help_content.replaceAll("\\n+", "%20"), "text/html", "UTF-8");
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/app/src/main/java/net/openvpn/openvpn/ClientAPI_ServerEntry.java:
--------------------------------------------------------------------------------
1 | package net.openvpn.openvpn;
2 |
3 | public class ClientAPI_ServerEntry {
4 | protected transient boolean swigCMemOwn;
5 | private transient long swigCPtr;
6 |
7 | protected ClientAPI_ServerEntry(long cPtr, boolean cMemoryOwn) {
8 | this.swigCMemOwn = cMemoryOwn;
9 | this.swigCPtr = cPtr;
10 | }
11 |
12 | protected static long getCPtr(ClientAPI_ServerEntry obj) {
13 | return obj == null ? 0 : obj.swigCPtr;
14 | }
15 |
16 | protected void finalize() {
17 | delete();
18 | }
19 |
20 | public synchronized void delete() {
21 | if (this.swigCPtr != 0) {
22 | if (this.swigCMemOwn) {
23 | this.swigCMemOwn = false;
24 | ovpncliJNI.delete_ClientAPI_ServerEntry(this.swigCPtr);
25 | }
26 | this.swigCPtr = 0;
27 | }
28 | }
29 |
30 | public void setServer(String value) {
31 | ovpncliJNI.ClientAPI_ServerEntry_server_set(this.swigCPtr, this, value);
32 | }
33 |
34 | public String getServer() {
35 | return ovpncliJNI.ClientAPI_ServerEntry_server_get(this.swigCPtr, this);
36 | }
37 |
38 | public void setFriendlyName(String value) {
39 | ovpncliJNI.ClientAPI_ServerEntry_friendlyName_set(this.swigCPtr, this, value);
40 | }
41 |
42 | public String getFriendlyName() {
43 | return ovpncliJNI.ClientAPI_ServerEntry_friendlyName_get(this.swigCPtr, this);
44 | }
45 |
46 | public ClientAPI_ServerEntry() {
47 | this(ovpncliJNI.new_ClientAPI_ServerEntry(), true);
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/app/src/main/java/net/openvpn/openvpn/ClientAPI_SessionToken.java:
--------------------------------------------------------------------------------
1 | package net.openvpn.openvpn;
2 |
3 | public class ClientAPI_SessionToken {
4 | protected transient boolean swigCMemOwn;
5 | private transient long swigCPtr;
6 |
7 | protected ClientAPI_SessionToken(long cPtr, boolean cMemoryOwn) {
8 | this.swigCMemOwn = cMemoryOwn;
9 | this.swigCPtr = cPtr;
10 | }
11 |
12 | protected static long getCPtr(ClientAPI_SessionToken obj) {
13 | return obj == null ? 0 : obj.swigCPtr;
14 | }
15 |
16 | protected void finalize() {
17 | delete();
18 | }
19 |
20 | public synchronized void delete() {
21 | if (this.swigCPtr != 0) {
22 | if (this.swigCMemOwn) {
23 | this.swigCMemOwn = false;
24 | ovpncliJNI.delete_ClientAPI_SessionToken(this.swigCPtr);
25 | }
26 | this.swigCPtr = 0;
27 | }
28 | }
29 |
30 | public void setUsername(String value) {
31 | ovpncliJNI.ClientAPI_SessionToken_username_set(this.swigCPtr, this, value);
32 | }
33 |
34 | public String getUsername() {
35 | return ovpncliJNI.ClientAPI_SessionToken_username_get(this.swigCPtr, this);
36 | }
37 |
38 | public void setSession_id(String value) {
39 | ovpncliJNI.ClientAPI_SessionToken_session_id_set(this.swigCPtr, this, value);
40 | }
41 |
42 | public String getSession_id() {
43 | return ovpncliJNI.ClientAPI_SessionToken_session_id_get(this.swigCPtr, this);
44 | }
45 |
46 | public ClientAPI_SessionToken() {
47 | this(ovpncliJNI.new_ClientAPI_SessionToken(), true);
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/app/src/main/java/net/openvpn/openvpn/ClientAPI_KeyValue.java:
--------------------------------------------------------------------------------
1 | package net.openvpn.openvpn;
2 |
3 | public class ClientAPI_KeyValue {
4 | protected transient boolean swigCMemOwn;
5 | private transient long swigCPtr;
6 |
7 | protected ClientAPI_KeyValue(long cPtr, boolean cMemoryOwn) {
8 | this.swigCMemOwn = cMemoryOwn;
9 | this.swigCPtr = cPtr;
10 | }
11 |
12 | protected static long getCPtr(ClientAPI_KeyValue obj) {
13 | return obj == null ? 0 : obj.swigCPtr;
14 | }
15 |
16 | protected void finalize() {
17 | delete();
18 | }
19 |
20 | public synchronized void delete() {
21 | if (this.swigCPtr != 0) {
22 | if (this.swigCMemOwn) {
23 | this.swigCMemOwn = false;
24 | ovpncliJNI.delete_ClientAPI_KeyValue(this.swigCPtr);
25 | }
26 | this.swigCPtr = 0;
27 | }
28 | }
29 |
30 | public ClientAPI_KeyValue() {
31 | this(ovpncliJNI.new_ClientAPI_KeyValue__SWIG_0(), true);
32 | }
33 |
34 | public ClientAPI_KeyValue(String key_arg, String value_arg) {
35 | this(ovpncliJNI.new_ClientAPI_KeyValue__SWIG_1(key_arg, value_arg), true);
36 | }
37 |
38 | public void setKey(String value) {
39 | ovpncliJNI.ClientAPI_KeyValue_key_set(this.swigCPtr, this, value);
40 | }
41 |
42 | public String getKey() {
43 | return ovpncliJNI.ClientAPI_KeyValue_key_get(this.swigCPtr, this);
44 | }
45 |
46 | public void setValue(String value) {
47 | ovpncliJNI.ClientAPI_KeyValue_value_set(this.swigCPtr, this, value);
48 | }
49 |
50 | public String getValue() {
51 | return ovpncliJNI.ClientAPI_KeyValue_value_get(this.swigCPtr, this);
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/proxy_creds.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/java/net/openvpn/openvpn/ClientAPI_ExternalPKISignRequest.java:
--------------------------------------------------------------------------------
1 | package net.openvpn.openvpn;
2 |
3 | public class ClientAPI_ExternalPKISignRequest extends ClientAPI_ExternalPKIRequestBase {
4 | private transient long swigCPtr;
5 |
6 | protected ClientAPI_ExternalPKISignRequest(long cPtr, boolean cMemoryOwn) {
7 | super(ovpncliJNI.ClientAPI_ExternalPKISignRequest_SWIGUpcast(cPtr), cMemoryOwn);
8 | this.swigCPtr = cPtr;
9 | }
10 |
11 | protected static long getCPtr(ClientAPI_ExternalPKISignRequest obj) {
12 | return obj == null ? 0 : obj.swigCPtr;
13 | }
14 |
15 | protected void finalize() {
16 | delete();
17 | }
18 |
19 | public synchronized void delete() {
20 | if (this.swigCPtr != 0) {
21 | if (this.swigCMemOwn) {
22 | this.swigCMemOwn = false;
23 | ovpncliJNI.delete_ClientAPI_ExternalPKISignRequest(this.swigCPtr);
24 | }
25 | this.swigCPtr = 0;
26 | }
27 | super.delete();
28 | }
29 |
30 | public void setData(String value) {
31 | ovpncliJNI.ClientAPI_ExternalPKISignRequest_data_set(this.swigCPtr, this, value);
32 | }
33 |
34 | public String getData() {
35 | return ovpncliJNI.ClientAPI_ExternalPKISignRequest_data_get(this.swigCPtr, this);
36 | }
37 |
38 | public void setSig(String value) {
39 | ovpncliJNI.ClientAPI_ExternalPKISignRequest_sig_set(this.swigCPtr, this, value);
40 | }
41 |
42 | public String getSig() {
43 | return ovpncliJNI.ClientAPI_ExternalPKISignRequest_sig_get(this.swigCPtr, this);
44 | }
45 |
46 | public ClientAPI_ExternalPKISignRequest() {
47 | this(ovpncliJNI.new_ClientAPI_ExternalPKISignRequest(), true);
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/app/src/main/java/net/openvpn/openvpn/ClientAPI_ExternalPKICertRequest.java:
--------------------------------------------------------------------------------
1 | package net.openvpn.openvpn;
2 |
3 | public class ClientAPI_ExternalPKICertRequest extends ClientAPI_ExternalPKIRequestBase {
4 | private transient long swigCPtr;
5 |
6 | protected ClientAPI_ExternalPKICertRequest(long cPtr, boolean cMemoryOwn) {
7 | super(ovpncliJNI.ClientAPI_ExternalPKICertRequest_SWIGUpcast(cPtr), cMemoryOwn);
8 | this.swigCPtr = cPtr;
9 | }
10 |
11 | protected static long getCPtr(ClientAPI_ExternalPKICertRequest obj) {
12 | return obj == null ? 0 : obj.swigCPtr;
13 | }
14 |
15 | protected void finalize() {
16 | delete();
17 | }
18 |
19 | public synchronized void delete() {
20 | if (this.swigCPtr != 0) {
21 | if (this.swigCMemOwn) {
22 | this.swigCMemOwn = false;
23 | ovpncliJNI.delete_ClientAPI_ExternalPKICertRequest(this.swigCPtr);
24 | }
25 | this.swigCPtr = 0;
26 | }
27 | super.delete();
28 | }
29 |
30 | public void setCert(String value) {
31 | ovpncliJNI.ClientAPI_ExternalPKICertRequest_cert_set(this.swigCPtr, this, value);
32 | }
33 |
34 | public String getCert() {
35 | return ovpncliJNI.ClientAPI_ExternalPKICertRequest_cert_get(this.swigCPtr, this);
36 | }
37 |
38 | public void setSupportingChain(String value) {
39 | ovpncliJNI.ClientAPI_ExternalPKICertRequest_supportingChain_set(this.swigCPtr, this, value);
40 | }
41 |
42 | public String getSupportingChain() {
43 | return ovpncliJNI.ClientAPI_ExternalPKICertRequest_supportingChain_get(this.swigCPtr, this);
44 | }
45 |
46 | public ClientAPI_ExternalPKICertRequest() {
47 | this(ovpncliJNI.new_ClientAPI_ExternalPKICertRequest(), true);
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/app/src/main/java/net/openvpn/openvpn/ClientAPI_Status.java:
--------------------------------------------------------------------------------
1 | package net.openvpn.openvpn;
2 |
3 | public class ClientAPI_Status {
4 | protected transient boolean swigCMemOwn;
5 | private transient long swigCPtr;
6 |
7 | protected ClientAPI_Status(long cPtr, boolean cMemoryOwn) {
8 | this.swigCMemOwn = cMemoryOwn;
9 | this.swigCPtr = cPtr;
10 | }
11 |
12 | protected static long getCPtr(ClientAPI_Status obj) {
13 | return obj == null ? 0 : obj.swigCPtr;
14 | }
15 |
16 | protected void finalize() {
17 | delete();
18 | }
19 |
20 | public synchronized void delete() {
21 | if (this.swigCPtr != 0) {
22 | if (this.swigCMemOwn) {
23 | this.swigCMemOwn = false;
24 | ovpncliJNI.delete_ClientAPI_Status(this.swigCPtr);
25 | }
26 | this.swigCPtr = 0;
27 | }
28 | }
29 |
30 | public void setError(boolean value) {
31 | ovpncliJNI.ClientAPI_Status_error_set(this.swigCPtr, this, value);
32 | }
33 |
34 | public boolean getError() {
35 | return ovpncliJNI.ClientAPI_Status_error_get(this.swigCPtr, this);
36 | }
37 |
38 | public void setStatus(String value) {
39 | ovpncliJNI.ClientAPI_Status_status_set(this.swigCPtr, this, value);
40 | }
41 |
42 | public String getStatus() {
43 | return ovpncliJNI.ClientAPI_Status_status_get(this.swigCPtr, this);
44 | }
45 |
46 | public void setMessage(String value) {
47 | ovpncliJNI.ClientAPI_Status_message_set(this.swigCPtr, this, value);
48 | }
49 |
50 | public String getMessage() {
51 | return ovpncliJNI.ClientAPI_Status_message_get(this.swigCPtr, this);
52 | }
53 |
54 | public ClientAPI_Status() {
55 | this(ovpncliJNI.new_ClientAPI_Status(), true);
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/app/src/main/java/net/openvpn/openvpn/OpenVPNAbout.java:
--------------------------------------------------------------------------------
1 | package net.openvpn.openvpn;
2 |
3 | import android.content.pm.PackageInfo;
4 | import android.os.Bundle;
5 | import android.util.Log;
6 | import android.widget.TextView;
7 | import java.io.IOException;
8 |
9 | public class OpenVPNAbout extends OpenVPNClientBase {
10 | private static final String TAG = "OpenVPNAbout";
11 |
12 | private Object expire_string;
13 |
14 | public void onCreate(Bundle savedInstanceState) {
15 | super.onCreate(savedInstanceState);
16 | setContentView(R.layout.about);
17 | String versionName = "0.0";
18 | int versionCode = 0;
19 | try {
20 | PackageInfo pi = getPackageManager().getPackageInfo(getPackageName(), 0);
21 | versionName = pi.versionName;
22 | versionCode = pi.versionCode;
23 | } catch (Exception e) {
24 | Log.e(TAG, "cannot obtain version info", e);
25 | }
26 | get_text_view(R.id.about_text).setText(String.format(resString(R.string.about_text), new Object[]{versionName, Integer.valueOf(versionCode)}));
27 | get_text_view(R.id.core_text).setText(OpenVPNClientBase.get_openvpn_core_platform());
28 | if (OpenVPNClientBase.get_app_expire_string() != null) {
29 | get_text_view(R.id.about_beta_expire_warn).setText(String.format(resString(R.string.beta_expire_warn), new Object[]{expire_string}));
30 | } else {
31 | findViewById(R.id.about_expire_group).setVisibility(8);
32 | }
33 | try {
34 | get_text_view(R.id.about_textview).setText(FileUtil.readAsset(this, "about.txt"));
35 | } catch (IOException e2) {
36 | Log.e(TAG, "Error opening about.txt", e2);
37 | }
38 | }
39 |
40 | private TextView get_text_view(int res_id) {
41 | return (TextView) findViewById(res_id);
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/add_shortcut.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
14 |
15 |
18 |
19 |
21 |
22 |
25 |
26 |
27 |
28 |
29 |
30 |
33 |
34 |
38 |
39 |
42 |
43 |
47 |
48 |
53 |
54 |
60 |
61 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/attachment_receiver.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
10 |
11 |
14 |
15 |
18 |
19 |
22 |
23 |
25 |
26 |
29 |
30 |
34 |
35 |
38 |
39 |
40 |
41 |
46 |
47 |
48 |
49 |
50 |
51 |
53 |
54 |
58 |
59 |
65 |
66 |
72 |
73 |
74 |
75 |
76 |
77 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/notification_template_custom_big.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/import_profile.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
32 |
--------------------------------------------------------------------------------
/app/src/main/java/net/openvpn/openvpn/ClientAPI_Event.java:
--------------------------------------------------------------------------------
1 | package net.openvpn.openvpn;
2 |
3 | public class ClientAPI_Event {
4 | protected transient boolean swigCMemOwn;
5 | private transient long swigCPtr;
6 |
7 | protected ClientAPI_Event(long cPtr, boolean cMemoryOwn) {
8 | this.swigCMemOwn = cMemoryOwn;
9 | this.swigCPtr = cPtr;
10 | }
11 |
12 | protected static long getCPtr(ClientAPI_Event obj) {
13 | return obj == null ? 0 : obj.swigCPtr;
14 | }
15 |
16 | protected void finalize() {
17 | delete();
18 | }
19 |
20 | public synchronized void delete() {
21 | if (this.swigCPtr != 0) {
22 | if (this.swigCMemOwn) {
23 | this.swigCMemOwn = false;
24 | ovpncliJNI.delete_ClientAPI_Event(this.swigCPtr);
25 | }
26 | this.swigCPtr = 0;
27 | }
28 | }
29 |
30 | public void setError(boolean value) {
31 | ovpncliJNI.ClientAPI_Event_error_set(this.swigCPtr, this, value);
32 | }
33 |
34 | public boolean getError() {
35 | return ovpncliJNI.ClientAPI_Event_error_get(this.swigCPtr, this);
36 | }
37 |
38 | public void setFatal(boolean value) {
39 | ovpncliJNI.ClientAPI_Event_fatal_set(this.swigCPtr, this, value);
40 | }
41 |
42 | public boolean getFatal() {
43 | return ovpncliJNI.ClientAPI_Event_fatal_get(this.swigCPtr, this);
44 | }
45 |
46 | public void setName(String value) {
47 | ovpncliJNI.ClientAPI_Event_name_set(this.swigCPtr, this, value);
48 | }
49 |
50 | public String getName() {
51 | return ovpncliJNI.ClientAPI_Event_name_get(this.swigCPtr, this);
52 | }
53 |
54 | public void setInfo(String value) {
55 | ovpncliJNI.ClientAPI_Event_info_set(this.swigCPtr, this, value);
56 | }
57 |
58 | public String getInfo() {
59 | return ovpncliJNI.ClientAPI_Event_info_get(this.swigCPtr, this);
60 | }
61 |
62 | public ClientAPI_Event() {
63 | this(ovpncliJNI.new_ClientAPI_Event(), true);
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/app/src/main/java/net/openvpn/openvpn/ClientAPI_LLVector.java:
--------------------------------------------------------------------------------
1 | package net.openvpn.openvpn;
2 |
3 | public class ClientAPI_LLVector {
4 | protected transient boolean swigCMemOwn;
5 | private transient long swigCPtr;
6 |
7 | protected ClientAPI_LLVector(long cPtr, boolean cMemoryOwn) {
8 | this.swigCMemOwn = cMemoryOwn;
9 | this.swigCPtr = cPtr;
10 | }
11 |
12 | protected static long getCPtr(ClientAPI_LLVector obj) {
13 | return obj == null ? 0 : obj.swigCPtr;
14 | }
15 |
16 | protected void finalize() {
17 | delete();
18 | }
19 |
20 | public synchronized void delete() {
21 | if (this.swigCPtr != 0) {
22 | if (this.swigCMemOwn) {
23 | this.swigCMemOwn = false;
24 | ovpncliJNI.delete_ClientAPI_LLVector(this.swigCPtr);
25 | }
26 | this.swigCPtr = 0;
27 | }
28 | }
29 |
30 | public ClientAPI_LLVector() {
31 | this(ovpncliJNI.new_ClientAPI_LLVector__SWIG_0(), true);
32 | }
33 |
34 | public ClientAPI_LLVector(long n) {
35 | this(ovpncliJNI.new_ClientAPI_LLVector__SWIG_1(n), true);
36 | }
37 |
38 | public long size() {
39 | return ovpncliJNI.ClientAPI_LLVector_size(this.swigCPtr, this);
40 | }
41 |
42 | public long capacity() {
43 | return ovpncliJNI.ClientAPI_LLVector_capacity(this.swigCPtr, this);
44 | }
45 |
46 | public void reserve(long n) {
47 | ovpncliJNI.ClientAPI_LLVector_reserve(this.swigCPtr, this, n);
48 | }
49 |
50 | public boolean isEmpty() {
51 | return ovpncliJNI.ClientAPI_LLVector_isEmpty(this.swigCPtr, this);
52 | }
53 |
54 | public void clear() {
55 | ovpncliJNI.ClientAPI_LLVector_clear(this.swigCPtr, this);
56 | }
57 |
58 | public void add(long x) {
59 | ovpncliJNI.ClientAPI_LLVector_add(this.swigCPtr, this, x);
60 | }
61 |
62 | public long get(int i) {
63 | return ovpncliJNI.ClientAPI_LLVector_get(this.swigCPtr, this, i);
64 | }
65 |
66 | public void set(int i, long val) {
67 | ovpncliJNI.ClientAPI_LLVector_set(this.swigCPtr, this, i, val);
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/app/src/main/java/net/openvpn/openvpn/ClientAPI_RemoteOverride.java:
--------------------------------------------------------------------------------
1 | package net.openvpn.openvpn;
2 |
3 | public class ClientAPI_RemoteOverride {
4 | protected transient boolean swigCMemOwn;
5 | private transient long swigCPtr;
6 |
7 | protected ClientAPI_RemoteOverride(long cPtr, boolean cMemoryOwn) {
8 | this.swigCMemOwn = cMemoryOwn;
9 | this.swigCPtr = cPtr;
10 | }
11 |
12 | protected static long getCPtr(ClientAPI_RemoteOverride obj) {
13 | return obj == null ? 0 : obj.swigCPtr;
14 | }
15 |
16 | protected void finalize() {
17 | delete();
18 | }
19 |
20 | public synchronized void delete() {
21 | if (this.swigCPtr != 0) {
22 | if (this.swigCMemOwn) {
23 | this.swigCMemOwn = false;
24 | ovpncliJNI.delete_ClientAPI_RemoteOverride(this.swigCPtr);
25 | }
26 | this.swigCPtr = 0;
27 | }
28 | }
29 |
30 | public void setHost(String value) {
31 | ovpncliJNI.ClientAPI_RemoteOverride_host_set(this.swigCPtr, this, value);
32 | }
33 |
34 | public String getHost() {
35 | return ovpncliJNI.ClientAPI_RemoteOverride_host_get(this.swigCPtr, this);
36 | }
37 |
38 | public void setIp(String value) {
39 | ovpncliJNI.ClientAPI_RemoteOverride_ip_set(this.swigCPtr, this, value);
40 | }
41 |
42 | public String getIp() {
43 | return ovpncliJNI.ClientAPI_RemoteOverride_ip_get(this.swigCPtr, this);
44 | }
45 |
46 | public void setPort(String value) {
47 | ovpncliJNI.ClientAPI_RemoteOverride_port_set(this.swigCPtr, this, value);
48 | }
49 |
50 | public String getPort() {
51 | return ovpncliJNI.ClientAPI_RemoteOverride_port_get(this.swigCPtr, this);
52 | }
53 |
54 | public void setProto(String value) {
55 | ovpncliJNI.ClientAPI_RemoteOverride_proto_set(this.swigCPtr, this, value);
56 | }
57 |
58 | public String getProto() {
59 | return ovpncliJNI.ClientAPI_RemoteOverride_proto_get(this.swigCPtr, this);
60 | }
61 |
62 | public ClientAPI_RemoteOverride() {
63 | this(ovpncliJNI.new_ClientAPI_RemoteOverride(), true);
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/app/src/main/java/net/openvpn/openvpn/ClientAPI_DynamicChallenge.java:
--------------------------------------------------------------------------------
1 | package net.openvpn.openvpn;
2 |
3 | public class ClientAPI_DynamicChallenge {
4 | protected transient boolean swigCMemOwn;
5 | private transient long swigCPtr;
6 |
7 | protected ClientAPI_DynamicChallenge(long cPtr, boolean cMemoryOwn) {
8 | this.swigCMemOwn = cMemoryOwn;
9 | this.swigCPtr = cPtr;
10 | }
11 |
12 | protected static long getCPtr(ClientAPI_DynamicChallenge obj) {
13 | return obj == null ? 0 : obj.swigCPtr;
14 | }
15 |
16 | protected void finalize() {
17 | delete();
18 | }
19 |
20 | public synchronized void delete() {
21 | if (this.swigCPtr != 0) {
22 | if (this.swigCMemOwn) {
23 | this.swigCMemOwn = false;
24 | ovpncliJNI.delete_ClientAPI_DynamicChallenge(this.swigCPtr);
25 | }
26 | this.swigCPtr = 0;
27 | }
28 | }
29 |
30 | public void setChallenge(String value) {
31 | ovpncliJNI.ClientAPI_DynamicChallenge_challenge_set(this.swigCPtr, this, value);
32 | }
33 |
34 | public String getChallenge() {
35 | return ovpncliJNI.ClientAPI_DynamicChallenge_challenge_get(this.swigCPtr, this);
36 | }
37 |
38 | public void setEcho(boolean value) {
39 | ovpncliJNI.ClientAPI_DynamicChallenge_echo_set(this.swigCPtr, this, value);
40 | }
41 |
42 | public boolean getEcho() {
43 | return ovpncliJNI.ClientAPI_DynamicChallenge_echo_get(this.swigCPtr, this);
44 | }
45 |
46 | public void setResponseRequired(boolean value) {
47 | ovpncliJNI.ClientAPI_DynamicChallenge_responseRequired_set(this.swigCPtr, this, value);
48 | }
49 |
50 | public boolean getResponseRequired() {
51 | return ovpncliJNI.ClientAPI_DynamicChallenge_responseRequired_get(this.swigCPtr, this);
52 | }
53 |
54 | public void setStateID(String value) {
55 | ovpncliJNI.ClientAPI_DynamicChallenge_stateID_set(this.swigCPtr, this, value);
56 | }
57 |
58 | public String getStateID() {
59 | return ovpncliJNI.ClientAPI_DynamicChallenge_stateID_get(this.swigCPtr, this);
60 | }
61 |
62 | public ClientAPI_DynamicChallenge() {
63 | this(ovpncliJNI.new_ClientAPI_DynamicChallenge(), true);
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/app/src/main/java/net/openvpn/openvpn/ClientAPI_ExternalPKIRequestBase.java:
--------------------------------------------------------------------------------
1 | package net.openvpn.openvpn;
2 |
3 | public class ClientAPI_ExternalPKIRequestBase {
4 | protected transient boolean swigCMemOwn;
5 | private transient long swigCPtr;
6 |
7 | protected ClientAPI_ExternalPKIRequestBase(long cPtr, boolean cMemoryOwn) {
8 | this.swigCMemOwn = cMemoryOwn;
9 | this.swigCPtr = cPtr;
10 | }
11 |
12 | protected static long getCPtr(ClientAPI_ExternalPKIRequestBase obj) {
13 | return obj == null ? 0 : obj.swigCPtr;
14 | }
15 |
16 | protected void finalize() {
17 | delete();
18 | }
19 |
20 | public synchronized void delete() {
21 | if (this.swigCPtr != 0) {
22 | if (this.swigCMemOwn) {
23 | this.swigCMemOwn = false;
24 | ovpncliJNI.delete_ClientAPI_ExternalPKIRequestBase(this.swigCPtr);
25 | }
26 | this.swigCPtr = 0;
27 | }
28 | }
29 |
30 | public void setError(boolean value) {
31 | ovpncliJNI.ClientAPI_ExternalPKIRequestBase_error_set(this.swigCPtr, this, value);
32 | }
33 |
34 | public boolean getError() {
35 | return ovpncliJNI.ClientAPI_ExternalPKIRequestBase_error_get(this.swigCPtr, this);
36 | }
37 |
38 | public void setErrorText(String value) {
39 | ovpncliJNI.ClientAPI_ExternalPKIRequestBase_errorText_set(this.swigCPtr, this, value);
40 | }
41 |
42 | public String getErrorText() {
43 | return ovpncliJNI.ClientAPI_ExternalPKIRequestBase_errorText_get(this.swigCPtr, this);
44 | }
45 |
46 | public void setInvalidAlias(boolean value) {
47 | ovpncliJNI.ClientAPI_ExternalPKIRequestBase_invalidAlias_set(this.swigCPtr, this, value);
48 | }
49 |
50 | public boolean getInvalidAlias() {
51 | return ovpncliJNI.ClientAPI_ExternalPKIRequestBase_invalidAlias_get(this.swigCPtr, this);
52 | }
53 |
54 | public void setAlias(String value) {
55 | ovpncliJNI.ClientAPI_ExternalPKIRequestBase_alias_set(this.swigCPtr, this, value);
56 | }
57 |
58 | public String getAlias() {
59 | return ovpncliJNI.ClientAPI_ExternalPKIRequestBase_alias_get(this.swigCPtr, this);
60 | }
61 |
62 | public ClientAPI_ExternalPKIRequestBase() {
63 | this(ovpncliJNI.new_ClientAPI_ExternalPKIRequestBase(), true);
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/app/src/main/java/net/openvpn/openvpn/ClientAPI_ServerEntryVector.java:
--------------------------------------------------------------------------------
1 | package net.openvpn.openvpn;
2 |
3 | public class ClientAPI_ServerEntryVector {
4 | protected transient boolean swigCMemOwn;
5 | private transient long swigCPtr;
6 |
7 | protected ClientAPI_ServerEntryVector(long cPtr, boolean cMemoryOwn) {
8 | this.swigCMemOwn = cMemoryOwn;
9 | this.swigCPtr = cPtr;
10 | }
11 |
12 | protected static long getCPtr(ClientAPI_ServerEntryVector obj) {
13 | return obj == null ? 0 : obj.swigCPtr;
14 | }
15 |
16 | protected void finalize() {
17 | delete();
18 | }
19 |
20 | public synchronized void delete() {
21 | if (this.swigCPtr != 0) {
22 | if (this.swigCMemOwn) {
23 | this.swigCMemOwn = false;
24 | ovpncliJNI.delete_ClientAPI_ServerEntryVector(this.swigCPtr);
25 | }
26 | this.swigCPtr = 0;
27 | }
28 | }
29 |
30 | public ClientAPI_ServerEntryVector() {
31 | this(ovpncliJNI.new_ClientAPI_ServerEntryVector__SWIG_0(), true);
32 | }
33 |
34 | public ClientAPI_ServerEntryVector(long n) {
35 | this(ovpncliJNI.new_ClientAPI_ServerEntryVector__SWIG_1(n), true);
36 | }
37 |
38 | public long size() {
39 | return ovpncliJNI.ClientAPI_ServerEntryVector_size(this.swigCPtr, this);
40 | }
41 |
42 | public long capacity() {
43 | return ovpncliJNI.ClientAPI_ServerEntryVector_capacity(this.swigCPtr, this);
44 | }
45 |
46 | public void reserve(long n) {
47 | ovpncliJNI.ClientAPI_ServerEntryVector_reserve(this.swigCPtr, this, n);
48 | }
49 |
50 | public boolean isEmpty() {
51 | return ovpncliJNI.ClientAPI_ServerEntryVector_isEmpty(this.swigCPtr, this);
52 | }
53 |
54 | public void clear() {
55 | ovpncliJNI.ClientAPI_ServerEntryVector_clear(this.swigCPtr, this);
56 | }
57 |
58 | public void add(ClientAPI_ServerEntry x) {
59 | ovpncliJNI.ClientAPI_ServerEntryVector_add(this.swigCPtr, this, ClientAPI_ServerEntry.getCPtr(x), x);
60 | }
61 |
62 | public ClientAPI_ServerEntry get(int i) {
63 | return new ClientAPI_ServerEntry(ovpncliJNI.ClientAPI_ServerEntryVector_get(this.swigCPtr, this, i), false);
64 | }
65 |
66 | public void set(int i, ClientAPI_ServerEntry val) {
67 | ovpncliJNI.ClientAPI_ServerEntryVector_set(this.swigCPtr, this, i, ClientAPI_ServerEntry.getCPtr(val), val);
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/add_proxy.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
16 |
17 |
21 |
22 |
27 |
28 |
32 |
33 |
38 |
39 |
43 |
44 |
49 |
50 |
53 |
54 |
58 |
59 |
60 |
61 |
66 |
67 |
73 |
74 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
--------------------------------------------------------------------------------
/app/src/main/java/net/openvpn/openvpn/SpinUtil.java:
--------------------------------------------------------------------------------
1 | package net.openvpn.openvpn;
2 |
3 | import android.content.Context;
4 | import android.widget.ArrayAdapter;
5 | import android.widget.Spinner;
6 | import java.util.Arrays;
7 |
8 | public class SpinUtil {
9 | public static String[] get_spinner_list(Spinner spin) {
10 | ArrayAdapter aa = (ArrayAdapter) spin.getAdapter();
11 | if (aa == null) {
12 | return null;
13 | }
14 | int len = aa.getCount();
15 | String[] ret = new String[len];
16 | for (int i = 0; i < len; i++) {
17 | ret[i] = (String) aa.getItem(i);
18 | }
19 | return ret;
20 | }
21 |
22 | public static int get_spinner_count(Spinner spin) {
23 | ArrayAdapter aa = (ArrayAdapter) spin.getAdapter();
24 | if (aa == null) {
25 | return 0;
26 | }
27 | return aa.getCount();
28 | }
29 |
30 | public static String get_spinner_list_item(Spinner spin, int position) {
31 | ArrayAdapter aa = (ArrayAdapter) spin.getAdapter();
32 | if (aa == null) {
33 | return null;
34 | }
35 | return (String) aa.getItem(position);
36 | }
37 |
38 | public static String get_spinner_selected_item(Spinner spin) {
39 | return (String) spin.getSelectedItem();
40 | }
41 |
42 | public static void set_spinner_selected_item(Spinner spin, String selected_item) {
43 | if (selected_item != null) {
44 | String sel = get_spinner_selected_item(spin);
45 | if (sel == null || !selected_item.equals(sel)) {
46 | ArrayAdapter aa = (ArrayAdapter) spin.getAdapter();
47 | int len = aa.getCount();
48 | for (int pos = 0; pos < len; pos++) {
49 | if (selected_item.equals(aa.getItem(pos))) {
50 | spin.setSelection(pos);
51 | }
52 | }
53 | }
54 | }
55 | }
56 |
57 | public static void show_spinner(Context context, Spinner spin, String[] content) {
58 | if (content != null) {
59 | String[] live_content = get_spinner_list(spin);
60 | if (live_content == null || !Arrays.equals(content, live_content)) {
61 | ArrayAdapter aa = new ArrayAdapter(context, 17367048, content);
62 | aa.setDropDownViewResource(17367049);
63 | spin.setAdapter(aa);
64 | }
65 | }
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/app/src/main/java/net/openvpn/openvpn/ClientAPI_TransportStats.java:
--------------------------------------------------------------------------------
1 | package net.openvpn.openvpn;
2 |
3 | public class ClientAPI_TransportStats {
4 | protected transient boolean swigCMemOwn;
5 | private transient long swigCPtr;
6 |
7 | protected ClientAPI_TransportStats(long cPtr, boolean cMemoryOwn) {
8 | this.swigCMemOwn = cMemoryOwn;
9 | this.swigCPtr = cPtr;
10 | }
11 |
12 | protected static long getCPtr(ClientAPI_TransportStats obj) {
13 | return obj == null ? 0 : obj.swigCPtr;
14 | }
15 |
16 | protected void finalize() {
17 | delete();
18 | }
19 |
20 | public synchronized void delete() {
21 | if (this.swigCPtr != 0) {
22 | if (this.swigCMemOwn) {
23 | this.swigCMemOwn = false;
24 | ovpncliJNI.delete_ClientAPI_TransportStats(this.swigCPtr);
25 | }
26 | this.swigCPtr = 0;
27 | }
28 | }
29 |
30 | public void setBytesIn(long value) {
31 | ovpncliJNI.ClientAPI_TransportStats_bytesIn_set(this.swigCPtr, this, value);
32 | }
33 |
34 | public long getBytesIn() {
35 | return ovpncliJNI.ClientAPI_TransportStats_bytesIn_get(this.swigCPtr, this);
36 | }
37 |
38 | public void setBytesOut(long value) {
39 | ovpncliJNI.ClientAPI_TransportStats_bytesOut_set(this.swigCPtr, this, value);
40 | }
41 |
42 | public long getBytesOut() {
43 | return ovpncliJNI.ClientAPI_TransportStats_bytesOut_get(this.swigCPtr, this);
44 | }
45 |
46 | public void setPacketsIn(long value) {
47 | ovpncliJNI.ClientAPI_TransportStats_packetsIn_set(this.swigCPtr, this, value);
48 | }
49 |
50 | public long getPacketsIn() {
51 | return ovpncliJNI.ClientAPI_TransportStats_packetsIn_get(this.swigCPtr, this);
52 | }
53 |
54 | public void setPacketsOut(long value) {
55 | ovpncliJNI.ClientAPI_TransportStats_packetsOut_set(this.swigCPtr, this, value);
56 | }
57 |
58 | public long getPacketsOut() {
59 | return ovpncliJNI.ClientAPI_TransportStats_packetsOut_get(this.swigCPtr, this);
60 | }
61 |
62 | public void setLastPacketReceived(int value) {
63 | ovpncliJNI.ClientAPI_TransportStats_lastPacketReceived_set(this.swigCPtr, this, value);
64 | }
65 |
66 | public int getLastPacketReceived() {
67 | return ovpncliJNI.ClientAPI_TransportStats_lastPacketReceived_get(this.swigCPtr, this);
68 | }
69 |
70 | public ClientAPI_TransportStats() {
71 | this(ovpncliJNI.new_ClientAPI_TransportStats(), true);
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/app/src/main/res/layout-v21/notification_template_custom_big.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/java/net/openvpn/openvpn/ClientAPI_MergeConfig.java:
--------------------------------------------------------------------------------
1 | package net.openvpn.openvpn;
2 |
3 | public class ClientAPI_MergeConfig {
4 | protected transient boolean swigCMemOwn;
5 | private transient long swigCPtr;
6 |
7 | protected ClientAPI_MergeConfig(long cPtr, boolean cMemoryOwn) {
8 | this.swigCMemOwn = cMemoryOwn;
9 | this.swigCPtr = cPtr;
10 | }
11 |
12 | protected static long getCPtr(ClientAPI_MergeConfig obj) {
13 | return obj == null ? 0 : obj.swigCPtr;
14 | }
15 |
16 | protected void finalize() {
17 | delete();
18 | }
19 |
20 | public synchronized void delete() {
21 | if (this.swigCPtr != 0) {
22 | if (this.swigCMemOwn) {
23 | this.swigCMemOwn = false;
24 | ovpncliJNI.delete_ClientAPI_MergeConfig(this.swigCPtr);
25 | }
26 | this.swigCPtr = 0;
27 | }
28 | }
29 |
30 | public void setStatus(String value) {
31 | ovpncliJNI.ClientAPI_MergeConfig_status_set(this.swigCPtr, this, value);
32 | }
33 |
34 | public String getStatus() {
35 | return ovpncliJNI.ClientAPI_MergeConfig_status_get(this.swigCPtr, this);
36 | }
37 |
38 | public void setErrorText(String value) {
39 | ovpncliJNI.ClientAPI_MergeConfig_errorText_set(this.swigCPtr, this, value);
40 | }
41 |
42 | public String getErrorText() {
43 | return ovpncliJNI.ClientAPI_MergeConfig_errorText_get(this.swigCPtr, this);
44 | }
45 |
46 | public void setBasename(String value) {
47 | ovpncliJNI.ClientAPI_MergeConfig_basename_set(this.swigCPtr, this, value);
48 | }
49 |
50 | public String getBasename() {
51 | return ovpncliJNI.ClientAPI_MergeConfig_basename_get(this.swigCPtr, this);
52 | }
53 |
54 | public void setProfileContent(String value) {
55 | ovpncliJNI.ClientAPI_MergeConfig_profileContent_set(this.swigCPtr, this, value);
56 | }
57 |
58 | public String getProfileContent() {
59 | return ovpncliJNI.ClientAPI_MergeConfig_profileContent_get(this.swigCPtr, this);
60 | }
61 |
62 | public void setRefPathList(SWIGTYPE_p_std__vectorT_std__string_t value) {
63 | ovpncliJNI.ClientAPI_MergeConfig_refPathList_set(this.swigCPtr, this, SWIGTYPE_p_std__vectorT_std__string_t.getCPtr(value));
64 | }
65 |
66 | public SWIGTYPE_p_std__vectorT_std__string_t getRefPathList() {
67 | long cPtr = ovpncliJNI.ClientAPI_MergeConfig_refPathList_get(this.swigCPtr, this);
68 | return cPtr == 0 ? null : new SWIGTYPE_p_std__vectorT_std__string_t(cPtr, false);
69 | }
70 |
71 | public ClientAPI_MergeConfig() {
72 | this(ovpncliJNI.new_ClientAPI_MergeConfig(), true);
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/app/src/main/java/net/openvpn/openvpn/ClientAPI_InterfaceStats.java:
--------------------------------------------------------------------------------
1 | package net.openvpn.openvpn;
2 |
3 | public class ClientAPI_InterfaceStats {
4 | protected transient boolean swigCMemOwn;
5 | private transient long swigCPtr;
6 |
7 | protected ClientAPI_InterfaceStats(long cPtr, boolean cMemoryOwn) {
8 | this.swigCMemOwn = cMemoryOwn;
9 | this.swigCPtr = cPtr;
10 | }
11 |
12 | protected static long getCPtr(ClientAPI_InterfaceStats obj) {
13 | return obj == null ? 0 : obj.swigCPtr;
14 | }
15 |
16 | protected void finalize() {
17 | delete();
18 | }
19 |
20 | public synchronized void delete() {
21 | if (this.swigCPtr != 0) {
22 | if (this.swigCMemOwn) {
23 | this.swigCMemOwn = false;
24 | ovpncliJNI.delete_ClientAPI_InterfaceStats(this.swigCPtr);
25 | }
26 | this.swigCPtr = 0;
27 | }
28 | }
29 |
30 | public void setBytesIn(long value) {
31 | ovpncliJNI.ClientAPI_InterfaceStats_bytesIn_set(this.swigCPtr, this, value);
32 | }
33 |
34 | public long getBytesIn() {
35 | return ovpncliJNI.ClientAPI_InterfaceStats_bytesIn_get(this.swigCPtr, this);
36 | }
37 |
38 | public void setPacketsIn(long value) {
39 | ovpncliJNI.ClientAPI_InterfaceStats_packetsIn_set(this.swigCPtr, this, value);
40 | }
41 |
42 | public long getPacketsIn() {
43 | return ovpncliJNI.ClientAPI_InterfaceStats_packetsIn_get(this.swigCPtr, this);
44 | }
45 |
46 | public void setErrorsIn(long value) {
47 | ovpncliJNI.ClientAPI_InterfaceStats_errorsIn_set(this.swigCPtr, this, value);
48 | }
49 |
50 | public long getErrorsIn() {
51 | return ovpncliJNI.ClientAPI_InterfaceStats_errorsIn_get(this.swigCPtr, this);
52 | }
53 |
54 | public void setBytesOut(long value) {
55 | ovpncliJNI.ClientAPI_InterfaceStats_bytesOut_set(this.swigCPtr, this, value);
56 | }
57 |
58 | public long getBytesOut() {
59 | return ovpncliJNI.ClientAPI_InterfaceStats_bytesOut_get(this.swigCPtr, this);
60 | }
61 |
62 | public void setPacketsOut(long value) {
63 | ovpncliJNI.ClientAPI_InterfaceStats_packetsOut_set(this.swigCPtr, this, value);
64 | }
65 |
66 | public long getPacketsOut() {
67 | return ovpncliJNI.ClientAPI_InterfaceStats_packetsOut_get(this.swigCPtr, this);
68 | }
69 |
70 | public void setErrorsOut(long value) {
71 | ovpncliJNI.ClientAPI_InterfaceStats_errorsOut_set(this.swigCPtr, this, value);
72 | }
73 |
74 | public long getErrorsOut() {
75 | return ovpncliJNI.ClientAPI_InterfaceStats_errorsOut_get(this.swigCPtr, this);
76 | }
77 |
78 | public ClientAPI_InterfaceStats() {
79 | this(ovpncliJNI.new_ClientAPI_InterfaceStats(), true);
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/app/src/main/java/net/openvpn/openvpn/ClientAPI_ProvideCreds.java:
--------------------------------------------------------------------------------
1 | package net.openvpn.openvpn;
2 |
3 | public class ClientAPI_ProvideCreds {
4 | protected transient boolean swigCMemOwn;
5 | private transient long swigCPtr;
6 |
7 | protected ClientAPI_ProvideCreds(long cPtr, boolean cMemoryOwn) {
8 | this.swigCMemOwn = cMemoryOwn;
9 | this.swigCPtr = cPtr;
10 | }
11 |
12 | protected static long getCPtr(ClientAPI_ProvideCreds obj) {
13 | return obj == null ? 0 : obj.swigCPtr;
14 | }
15 |
16 | protected void finalize() {
17 | delete();
18 | }
19 |
20 | public synchronized void delete() {
21 | if (this.swigCPtr != 0) {
22 | if (this.swigCMemOwn) {
23 | this.swigCMemOwn = false;
24 | ovpncliJNI.delete_ClientAPI_ProvideCreds(this.swigCPtr);
25 | }
26 | this.swigCPtr = 0;
27 | }
28 | }
29 |
30 | public void setUsername(String value) {
31 | ovpncliJNI.ClientAPI_ProvideCreds_username_set(this.swigCPtr, this, value);
32 | }
33 |
34 | public String getUsername() {
35 | return ovpncliJNI.ClientAPI_ProvideCreds_username_get(this.swigCPtr, this);
36 | }
37 |
38 | public void setPassword(String value) {
39 | ovpncliJNI.ClientAPI_ProvideCreds_password_set(this.swigCPtr, this, value);
40 | }
41 |
42 | public String getPassword() {
43 | return ovpncliJNI.ClientAPI_ProvideCreds_password_get(this.swigCPtr, this);
44 | }
45 |
46 | public void setResponse(String value) {
47 | ovpncliJNI.ClientAPI_ProvideCreds_response_set(this.swigCPtr, this, value);
48 | }
49 |
50 | public String getResponse() {
51 | return ovpncliJNI.ClientAPI_ProvideCreds_response_get(this.swigCPtr, this);
52 | }
53 |
54 | public void setDynamicChallengeCookie(String value) {
55 | ovpncliJNI.ClientAPI_ProvideCreds_dynamicChallengeCookie_set(this.swigCPtr, this, value);
56 | }
57 |
58 | public String getDynamicChallengeCookie() {
59 | return ovpncliJNI.ClientAPI_ProvideCreds_dynamicChallengeCookie_get(this.swigCPtr, this);
60 | }
61 |
62 | public void setReplacePasswordWithSessionID(boolean value) {
63 | ovpncliJNI.ClientAPI_ProvideCreds_replacePasswordWithSessionID_set(this.swigCPtr, this, value);
64 | }
65 |
66 | public boolean getReplacePasswordWithSessionID() {
67 | return ovpncliJNI.ClientAPI_ProvideCreds_replacePasswordWithSessionID_get(this.swigCPtr, this);
68 | }
69 |
70 | public void setCachePassword(boolean value) {
71 | ovpncliJNI.ClientAPI_ProvideCreds_cachePassword_set(this.swigCPtr, this, value);
72 | }
73 |
74 | public boolean getCachePassword() {
75 | return ovpncliJNI.ClientAPI_ProvideCreds_cachePassword_get(this.swigCPtr, this);
76 | }
77 |
78 | public ClientAPI_ProvideCreds() {
79 | this(ovpncliJNI.new_ClientAPI_ProvideCreds(), true);
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/preferences.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/layout-v16/notification_template_custom_big.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/app/src/main/res/layout-v17/notification_template_custom_big.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/app/src/main/java/net/openvpn/openvpn/JellyBeanHack.java:
--------------------------------------------------------------------------------
1 | package net.openvpn.openvpn;
2 |
3 | import android.content.Context;
4 | import android.os.Build.VERSION;
5 | import android.security.KeyChain;
6 | import android.util.Log;
7 | import java.lang.reflect.Method;
8 | import java.security.InvalidKeyException;
9 | import java.security.PrivateKey;
10 |
11 | public class JellyBeanHack extends JellyBeanHackBase {
12 | private static final String TAG = "JellyBeanHack";
13 | private String alias_;
14 | private PrivateKey pk_;
15 | private boolean rsa_sign_initialized = false;
16 |
17 | private static native void pkey_retain(int i);
18 |
19 | private static native byte[] rsa_sign(byte[] bArr, int i) throws InvalidKeyException;
20 |
21 | private static native int rsa_sign_init();
22 |
23 | public static JellyBeanHack newJellyBeanHack() {
24 | Log.i(TAG, String.format("Build.VERSION.SDK_INT=%d", new Object[]{Integer.valueOf(VERSION.SDK_INT)}));
25 | if (VERSION.SDK_INT == 16) {
26 | return new JellyBeanHack();
27 | }
28 | return null;
29 | }
30 |
31 | private JellyBeanHack() {
32 | resetPrivateKey();
33 | if (rsa_sign_init() == 1) {
34 | this.rsa_sign_initialized = true;
35 | }
36 | Log.i(TAG, String.format("JellyBeanHack: rsa_sign_initialized=%b", new Object[]{Boolean.valueOf(this.rsa_sign_initialized)}));
37 | }
38 |
39 | public boolean enabled() {
40 | return this.rsa_sign_initialized;
41 | }
42 |
43 | public synchronized void resetPrivateKey() {
44 | Log.i(TAG, "JellyBeanHack: resetPrivateKey");
45 | this.alias_ = null;
46 | this.pk_ = null;
47 | }
48 |
49 | public synchronized PrivateKey getPrivateKey(Context context, String alias) throws Exception {
50 | PrivateKey pk;
51 | pk = get_pk(alias);
52 | if (pk == null) {
53 | pk = set_pk(alias, KeyChain.getPrivateKey(context, alias));
54 | }
55 | return pk;
56 | }
57 |
58 | public synchronized byte[] rsaSign(PrivateKey pk, byte[] data) throws Exception {
59 | return rsa_sign(data, openssl_pkey(pk));
60 | }
61 |
62 | private synchronized PrivateKey get_pk(String alias) {
63 | PrivateKey privateKey;
64 | if (this.alias_ == null || !this.alias_.equals(alias)) {
65 | privateKey = null;
66 | } else {
67 | privateKey = this.pk_;
68 | }
69 | return privateKey;
70 | }
71 |
72 | private synchronized PrivateKey set_pk(String alias, PrivateKey pk) throws Exception {
73 | this.alias_ = null;
74 | this.pk_ = null;
75 | if (pk != null) {
76 | pkey_retain(openssl_pkey(pk));
77 | if (alias != null && alias.length() > 0) {
78 | this.alias_ = alias;
79 | this.pk_ = pk;
80 | }
81 | }
82 | return this.pk_;
83 | }
84 |
85 | private static int openssl_pkey(PrivateKey privkey) throws Exception {
86 | if (privkey == null) {
87 | return 0;
88 | }
89 | Method getKey = privkey.getClass().getSuperclass().getDeclaredMethod("getOpenSSLKey", new Class[0]);
90 | getKey.setAccessible(true);
91 | Object opensslkey = getKey.invoke(privkey, new Object[0]);
92 | getKey.setAccessible(false);
93 | Method getPkeyContext = opensslkey.getClass().getDeclaredMethod("getPkeyContext", new Class[0]);
94 | getPkeyContext.setAccessible(true);
95 | int pkey = ((Integer) getPkeyContext.invoke(opensslkey, new Object[0])).intValue();
96 | getPkeyContext.setAccessible(false);
97 | return pkey;
98 | }
99 | }
100 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/file_dialog_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
14 |
15 |
24 |
25 |
29 |
30 |
36 |
37 |
43 |
44 |
50 |
51 |
52 |
53 |
54 |
55 |
64 |
65 |
70 |
71 |
76 |
77 |
81 |
82 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
100 |
101 |
104 |
105 |
108 |
109 |
113 |
114 |
119 |
120 |
121 |
122 |
123 |
124 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
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 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/app/src/main/java/net/openvpn/openvpn/OpenVPNLog.java:
--------------------------------------------------------------------------------
1 | package net.openvpn.openvpn;
2 |
3 | import android.os.Bundle;
4 | import android.text.method.ScrollingMovementMethod;
5 | import android.util.Log;
6 | import android.view.View;
7 | import android.view.View.OnClickListener;
8 | import android.widget.Button;
9 | import android.widget.ScrollView;
10 | import android.widget.TextView;
11 | import java.util.ArrayDeque;
12 | import java.util.ArrayList;
13 | import java.util.Iterator;
14 | import net.openvpn.openvpn.OpenVPNService.LogMsg;
15 |
16 | public class OpenVPNLog extends OpenVPNClientBase implements OnClickListener {
17 | private static final String TAG = "OpenVPNClientLog";
18 | private Button mPause;
19 | private Button mResume;
20 | private ScrollView mScrollView;
21 | private TextView mTextView;
22 | private ArrayList pause_buffer;
23 |
24 | public void onCreate(Bundle savedInstanceState) {
25 | super.onCreate(savedInstanceState);
26 | setContentView(R.layout.log);
27 | this.mTextView = (TextView) findViewById(R.id.log_textview);
28 | this.mScrollView = (ScrollView) findViewById(R.id.log_scrollview);
29 | this.mPause = (Button) findViewById(R.id.log_pause);
30 | this.mResume = (Button) findViewById(R.id.log_resume);
31 | this.mPause.setOnClickListener(this);
32 | this.mResume.setOnClickListener(this);
33 | this.mTextView.setMovementMethod(ScrollingMovementMethod.getInstance());
34 | doBindService();
35 | }
36 |
37 | private void set_pause_state(boolean state) {
38 | if (state) {
39 | this.mPause.setVisibility(8);
40 | this.mResume.setVisibility(0);
41 | this.pause_buffer = new ArrayList();
42 | return;
43 | }
44 | this.mPause.setVisibility(0);
45 | this.mResume.setVisibility(8);
46 | if (this.pause_buffer != null) {
47 | Iterator it = this.pause_buffer.iterator();
48 | while (it.hasNext()) {
49 | this.mTextView.append(((LogMsg) it.next()).line);
50 | }
51 | scroll_textview_to_bottom();
52 | this.pause_buffer = null;
53 | }
54 | }
55 |
56 | private void scroll_textview_to_bottom() {
57 | this.mScrollView.post(new Runnable() {
58 | public void run() {
59 | OpenVPNLog.this.mScrollView.smoothScrollTo(0, OpenVPNLog.this.mTextView.getBottom());
60 | }
61 | });
62 | }
63 |
64 | private void refresh_log_view() {
65 | ArrayDeque hist = log_history();
66 | if (hist != null) {
67 | StringBuilder builder = new StringBuilder();
68 | Iterator it = hist.iterator();
69 | while (it.hasNext()) {
70 | builder.append(((LogMsg) it.next()).line);
71 | }
72 | this.mTextView.setText(builder.toString());
73 | scroll_textview_to_bottom();
74 | }
75 | }
76 |
77 | public void onClick(View v) {
78 | Log.d(TAG, "LOG: onClick");
79 | int viewid = v.getId();
80 | if (viewid == R.id.log_pause) {
81 | Log.d(TAG, "LOG: onClick PAUSE");
82 | set_pause_state(true);
83 | } else if (viewid == R.id.log_resume) {
84 | Log.d(TAG, "LOG: onClick RESUME");
85 | set_pause_state(false);
86 | }
87 | }
88 |
89 | public void log(LogMsg lm) {
90 | if (this.pause_buffer == null) {
91 | this.mTextView.append(lm.line);
92 | scroll_textview_to_bottom();
93 | return;
94 | }
95 | this.pause_buffer.add(lm);
96 | }
97 |
98 | protected void onDestroy() {
99 | Log.d(TAG, "LOG: onDestroy");
100 | stop();
101 | super.onDestroy();
102 | }
103 |
104 | private void stop() {
105 | doUnbindService();
106 | }
107 |
108 | protected void post_bind() {
109 | Log.d(TAG, "LOG: post_bind");
110 | refresh_log_view();
111 | set_pause_state(false);
112 | }
113 | }
114 |
--------------------------------------------------------------------------------
/app/src/main/java/net/openvpn/openvpn/OpenVPNAddShortcut.java:
--------------------------------------------------------------------------------
1 | package net.openvpn.openvpn;
2 |
3 | import android.os.Bundle;
4 | import android.preference.PreferenceManager;
5 | import android.util.Log;
6 | import android.view.KeyEvent;
7 | import android.view.View;
8 | import android.view.View.OnClickListener;
9 | import android.widget.AdapterView;
10 | import android.widget.AdapterView.OnItemSelectedListener;
11 | import android.widget.Button;
12 | import android.widget.EditText;
13 | import android.widget.Spinner;
14 | import android.widget.TextView;
15 | import android.widget.TextView.OnEditorActionListener;
16 | import net.openvpn.openvpn.OpenVPNService.ProfileList;
17 |
18 | public class OpenVPNAddShortcut extends OpenVPNClientBase implements OnClickListener, OnItemSelectedListener, OnEditorActionListener {
19 | private static final String TAG = "OpenVPNAddShortcut";
20 | private Button cancel_button;
21 | private Button create_button;
22 | private PrefUtil prefs;
23 | private Spinner profile_spin;
24 | private EditText shortcut_name_edit;
25 |
26 | public void onCreate(Bundle savedInstanceState) {
27 | super.onCreate(savedInstanceState);
28 | setContentView(R.layout.add_shortcut);
29 | this.prefs = new PrefUtil(PreferenceManager.getDefaultSharedPreferences(this));
30 | this.profile_spin = (Spinner) findViewById(R.id.profile);
31 | this.shortcut_name_edit = (EditText) findViewById(R.id.shortcut_name);
32 | this.create_button = (Button) findViewById(R.id.create_shortcut_button);
33 | this.cancel_button = (Button) findViewById(R.id.cancel_shortcut_button);
34 | this.create_button.setOnClickListener(this);
35 | this.cancel_button.setOnClickListener(this);
36 | this.profile_spin.setOnItemSelectedListener(this);
37 | this.shortcut_name_edit.setOnEditorActionListener(this);
38 | doBindService();
39 | }
40 |
41 | public void onClick(View v) {
42 | Log.d(TAG, "onClick");
43 | if (v.getId() == R.id.create_shortcut_button) {
44 | createConnectShortcut(SpinUtil.get_spinner_selected_item(this.profile_spin), this.shortcut_name_edit.getText().toString());
45 | }
46 | finish();
47 | }
48 |
49 | private void createConnectShortcut(String _spinner_selected_item, String toString)
50 | {
51 | // TODO: Implement this method
52 | }
53 |
54 | public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
55 | if (!action_enter(actionId, event) || v != this.shortcut_name_edit) {
56 | return false;
57 | }
58 | onClick(this.create_button);
59 | return true;
60 | }
61 |
62 | protected void onDestroy() {
63 | Log.d(TAG, "onDestroy");
64 | stop();
65 | super.onDestroy();
66 | }
67 |
68 | private void stop() {
69 | doUnbindService();
70 | }
71 |
72 | protected void post_bind() {
73 | String prof_name;
74 | String[] prof_name_array;
75 | ProfileList proflist = profile_list();
76 | if (proflist == null || proflist.size() <= 0) {
77 | this.profile_spin.setEnabled(false);
78 | this.shortcut_name_edit.setEnabled(false);
79 | this.create_button.setEnabled(false);
80 | prof_name = resString(R.string.shortcut_no_profiles);
81 | prof_name_array = new String[]{prof_name};
82 | } else {
83 | prof_name = current_profile().get_name();
84 | prof_name_array = proflist.profile_names();
85 | }
86 | SpinUtil.show_spinner(this, this.profile_spin, prof_name_array);
87 | SpinUtil.set_spinner_selected_item(this.profile_spin, prof_name);
88 | set_shortcut_name(prof_name);
89 | }
90 |
91 | public void onItemSelected(AdapterView> adapterView, View v, int position, long id) {
92 | set_shortcut_name(SpinUtil.get_spinner_selected_item(this.profile_spin));
93 | }
94 |
95 | public void onNothingSelected(AdapterView> adapterView) {
96 | }
97 |
98 | private void set_shortcut_name(String name) {
99 | if (name != null) {
100 | this.shortcut_name_edit.setText(name);
101 | this.shortcut_name_edit.selectAll();
102 | this.shortcut_name_edit.requestFocus();
103 | }
104 | }
105 | }
106 |
--------------------------------------------------------------------------------
/app/src/main/java/net/openvpn/openvpn/ClientAPI_ConnectionInfo.java:
--------------------------------------------------------------------------------
1 | package net.openvpn.openvpn;
2 |
3 | public class ClientAPI_ConnectionInfo {
4 | protected transient boolean swigCMemOwn;
5 | private transient long swigCPtr;
6 |
7 | protected ClientAPI_ConnectionInfo(long cPtr, boolean cMemoryOwn) {
8 | this.swigCMemOwn = cMemoryOwn;
9 | this.swigCPtr = cPtr;
10 | }
11 |
12 | protected static long getCPtr(ClientAPI_ConnectionInfo obj) {
13 | return obj == null ? 0 : obj.swigCPtr;
14 | }
15 |
16 | protected void finalize() {
17 | delete();
18 | }
19 |
20 | public synchronized void delete() {
21 | if (this.swigCPtr != 0) {
22 | if (this.swigCMemOwn) {
23 | this.swigCMemOwn = false;
24 | ovpncliJNI.delete_ClientAPI_ConnectionInfo(this.swigCPtr);
25 | }
26 | this.swigCPtr = 0;
27 | }
28 | }
29 |
30 | public void setDefined(boolean value) {
31 | ovpncliJNI.ClientAPI_ConnectionInfo_defined_set(this.swigCPtr, this, value);
32 | }
33 |
34 | public boolean getDefined() {
35 | return ovpncliJNI.ClientAPI_ConnectionInfo_defined_get(this.swigCPtr, this);
36 | }
37 |
38 | public void setUser(String value) {
39 | ovpncliJNI.ClientAPI_ConnectionInfo_user_set(this.swigCPtr, this, value);
40 | }
41 |
42 | public String getUser() {
43 | return ovpncliJNI.ClientAPI_ConnectionInfo_user_get(this.swigCPtr, this);
44 | }
45 |
46 | public void setServerHost(String value) {
47 | ovpncliJNI.ClientAPI_ConnectionInfo_serverHost_set(this.swigCPtr, this, value);
48 | }
49 |
50 | public String getServerHost() {
51 | return ovpncliJNI.ClientAPI_ConnectionInfo_serverHost_get(this.swigCPtr, this);
52 | }
53 |
54 | public void setServerPort(String value) {
55 | ovpncliJNI.ClientAPI_ConnectionInfo_serverPort_set(this.swigCPtr, this, value);
56 | }
57 |
58 | public String getServerPort() {
59 | return ovpncliJNI.ClientAPI_ConnectionInfo_serverPort_get(this.swigCPtr, this);
60 | }
61 |
62 | public void setServerProto(String value) {
63 | ovpncliJNI.ClientAPI_ConnectionInfo_serverProto_set(this.swigCPtr, this, value);
64 | }
65 |
66 | public String getServerProto() {
67 | return ovpncliJNI.ClientAPI_ConnectionInfo_serverProto_get(this.swigCPtr, this);
68 | }
69 |
70 | public void setServerIp(String value) {
71 | ovpncliJNI.ClientAPI_ConnectionInfo_serverIp_set(this.swigCPtr, this, value);
72 | }
73 |
74 | public String getServerIp() {
75 | return ovpncliJNI.ClientAPI_ConnectionInfo_serverIp_get(this.swigCPtr, this);
76 | }
77 |
78 | public void setVpnIp4(String value) {
79 | ovpncliJNI.ClientAPI_ConnectionInfo_vpnIp4_set(this.swigCPtr, this, value);
80 | }
81 |
82 | public String getVpnIp4() {
83 | return ovpncliJNI.ClientAPI_ConnectionInfo_vpnIp4_get(this.swigCPtr, this);
84 | }
85 |
86 | public void setVpnIp6(String value) {
87 | ovpncliJNI.ClientAPI_ConnectionInfo_vpnIp6_set(this.swigCPtr, this, value);
88 | }
89 |
90 | public String getVpnIp6() {
91 | return ovpncliJNI.ClientAPI_ConnectionInfo_vpnIp6_get(this.swigCPtr, this);
92 | }
93 |
94 | public void setGw4(String value) {
95 | ovpncliJNI.ClientAPI_ConnectionInfo_gw4_set(this.swigCPtr, this, value);
96 | }
97 |
98 | public String getGw4() {
99 | return ovpncliJNI.ClientAPI_ConnectionInfo_gw4_get(this.swigCPtr, this);
100 | }
101 |
102 | public void setGw6(String value) {
103 | ovpncliJNI.ClientAPI_ConnectionInfo_gw6_set(this.swigCPtr, this, value);
104 | }
105 |
106 | public String getGw6() {
107 | return ovpncliJNI.ClientAPI_ConnectionInfo_gw6_get(this.swigCPtr, this);
108 | }
109 |
110 | public void setClientIp(String value) {
111 | ovpncliJNI.ClientAPI_ConnectionInfo_clientIp_set(this.swigCPtr, this, value);
112 | }
113 |
114 | public String getClientIp() {
115 | return ovpncliJNI.ClientAPI_ConnectionInfo_clientIp_get(this.swigCPtr, this);
116 | }
117 |
118 | public void setTunName(String value) {
119 | ovpncliJNI.ClientAPI_ConnectionInfo_tunName_set(this.swigCPtr, this, value);
120 | }
121 |
122 | public String getTunName() {
123 | return ovpncliJNI.ClientAPI_ConnectionInfo_tunName_get(this.swigCPtr, this);
124 | }
125 |
126 | public ClientAPI_ConnectionInfo() {
127 | this(ovpncliJNI.new_ClientAPI_ConnectionInfo(), true);
128 | }
129 | }
130 |
--------------------------------------------------------------------------------
/app/src/main/java/net/openvpn/openvpn/OpenVPNStats.java:
--------------------------------------------------------------------------------
1 | package net.openvpn.openvpn;
2 |
3 | import android.os.Bundle;
4 | import android.os.Handler;
5 | import android.util.Log;
6 | import android.view.View;
7 | import android.view.ViewGroup;
8 | import android.widget.AbsListView.LayoutParams;
9 | import android.widget.BaseAdapter;
10 | import android.widget.GridView;
11 | import android.widget.TextView;
12 | import java.util.ArrayList;
13 |
14 | public class OpenVPNStats extends OpenVPNClientBase {
15 | private static final String TAG = "OpenVPNClientStats";
16 | private StatsAdapter adapter;
17 | private GridView gridview;
18 | private Handler stats_timer_handler = new Handler();
19 | private Runnable stats_timer_task = new Runnable() {
20 | public void run() {
21 | OpenVPNStats.this.show_stats();
22 | OpenVPNStats.this.schedule_stats();
23 | }
24 | };
25 |
26 | private static class Stat {
27 | public int name_idx;
28 | public long value;
29 |
30 | private Stat() {
31 | }
32 | }
33 |
34 | private class StatsAdapter extends BaseAdapter {
35 | private String[] stat_names = OpenVPNService.stat_names();
36 | private ArrayList stats;
37 |
38 | StatsAdapter() {
39 | }
40 |
41 | public void update_stats(ClientAPI_LLVector new_stats) {
42 | ArrayList build_stats = new ArrayList();
43 | for (int i = 0; i < this.stat_names.length; i++) {
44 | long value = new_stats.get(i);
45 | if (value > 0) {
46 | Stat s = new Stat();
47 | s.name_idx = i;
48 | s.value = value;
49 | build_stats.add(s);
50 | }
51 | }
52 | this.stats = build_stats;
53 | notifyDataSetChanged();
54 | }
55 |
56 | public int getCount() {
57 | if (this.stats != null) {
58 | return this.stats.size() * 2;
59 | }
60 | return 0;
61 | }
62 |
63 | public Object getItem(int position) {
64 | return null;
65 | }
66 |
67 | public long getItemId(int position) {
68 | return 0;
69 | }
70 |
71 | private String text_at_pos(int pos) {
72 | Stat s = (Stat) this.stats.get(pos / 2);
73 | if (pos % 2 == 0) {
74 | return this.stat_names[s.name_idx];
75 | }
76 | return String.format("%d", new Object[]{Long.valueOf(s.value)});
77 | }
78 |
79 | public View getView(int position, View convertView, ViewGroup parent) {
80 | TextView tv;
81 | if (convertView == null) {
82 | tv = new TextView(OpenVPNStats.this);
83 | tv.setLayoutParams(new LayoutParams(-2, -2));
84 | } else {
85 | tv = (TextView) convertView;
86 | }
87 | tv.setText(text_at_pos(position));
88 | return tv;
89 | }
90 | }
91 |
92 | public void onCreate(Bundle savedInstanceState) {
93 | super.onCreate(savedInstanceState);
94 | setContentView(R.layout.stats);
95 | this.adapter = new StatsAdapter();
96 | this.gridview = (GridView) findViewById(R.id.stats_grid);
97 | this.gridview.setAdapter(this.adapter);
98 | doBindService();
99 | }
100 |
101 | private void cancel_stats() {
102 | this.stats_timer_handler.removeCallbacks(this.stats_timer_task);
103 | }
104 |
105 | private void schedule_stats() {
106 | cancel_stats();
107 | this.stats_timer_handler.postDelayed(this.stats_timer_task, 1000);
108 | }
109 |
110 | private void show_stats() {
111 | ClientAPI_LLVector sv = get_stat_values_full();
112 | if (sv != null) {
113 | this.adapter.update_stats(sv);
114 | }
115 | }
116 |
117 | protected void onDestroy() {
118 | Log.d(TAG, "STATS: onDestroy");
119 | stop();
120 | super.onDestroy();
121 | }
122 |
123 | private void stop() {
124 | cancel_stats();
125 | doUnbindService();
126 | }
127 |
128 | protected void onStop() {
129 | Log.d(TAG, "STATS: onStop");
130 | cancel_stats();
131 | super.onStop();
132 | }
133 |
134 | protected void onStart() {
135 | Log.d(TAG, "STATS: onStart");
136 | show_stats();
137 | schedule_stats();
138 | super.onStart();
139 | }
140 |
141 | protected void post_bind() {
142 | Log.d(TAG, "STATS: post_bind");
143 | show_stats();
144 | }
145 | }
146 |
--------------------------------------------------------------------------------
/app/src/main/java/net/openvpn/openvpn/FileUtil.java:
--------------------------------------------------------------------------------
1 | package net.openvpn.openvpn;
2 |
3 | import android.content.Context;
4 | import android.net.Uri;
5 | import java.io.BufferedReader;
6 | import java.io.File;
7 | import java.io.FileInputStream;
8 | import java.io.FileOutputStream;
9 | import java.io.IOException;
10 | import java.io.InputStream;
11 | import java.io.InputStreamReader;
12 | import java.io.Reader;
13 |
14 | public class FileUtil {
15 |
16 | public static class FileTooLarge extends IOException {
17 | public FileTooLarge(String fn, long max_size) {
18 | super(String.format(OpenVPNApplication.resString(R.string.file_too_large), new Object[]{fn, Long.valueOf(max_size)}));
19 | }
20 | }
21 |
22 | public static String readFile(String path, long max_len) throws IOException {
23 | return readStream(new FileInputStream(path), max_len, path);
24 | }
25 |
26 | public static String readUri(Context context, Uri uri, long max_len) throws IOException {
27 | return readStream(context.getContentResolver().openInputStream(uri), max_len, uriBasename(uri));
28 | }
29 |
30 | public static String readAsset(Context context, String filename) throws IOException {
31 | return readStream(context.getResources().getAssets().open(filename), 0, filename);
32 | }
33 |
34 | public static String readFileAppPrivate(Context context, String filename) throws IOException {
35 | return readStream(context.openFileInput(filename), 0, filename);
36 | }
37 |
38 | public static void writeFileAppPrivate(Context context, String filename, String content) throws IOException {
39 | FileOutputStream fos = context.openFileOutput(filename, 0);
40 | try {
41 | fos.write(content.getBytes());
42 | } finally {
43 | fos.close();
44 | }
45 | }
46 |
47 | public static String readStream(InputStream stream, long max_len, String fn) throws IOException {
48 | try {
49 | Reader reader = new BufferedReader(new InputStreamReader(stream));
50 | StringBuilder builder = new StringBuilder();
51 | char[] buffer = new char[4096];
52 | while (true) {
53 | int read = reader.read(buffer, 0, buffer.length);
54 | if (read <= 0) {
55 | break;
56 | }
57 | builder.append(buffer, 0, read);
58 | if (max_len > 0 && ((long) builder.length()) > max_len) {
59 | throw new FileTooLarge(fn, max_len);
60 | }
61 | }
62 | String stringBuilder = builder.toString();
63 | return stringBuilder;
64 | } finally {
65 | stream.close();
66 | }
67 | }
68 |
69 | public static byte[] readFileByteArray(String path, long max_len) throws IOException {
70 | File file = new File(path);
71 | InputStream is = new FileInputStream(file);
72 | try {
73 | long length = file.length();
74 | if ((max_len <= 0 || length <= max_len) && length <= 2147483647L) {
75 | byte[] bytes = new byte[((int) length)];
76 | int offset = 0;
77 | while (offset < bytes.length) {
78 | int numRead = is.read(bytes, offset, bytes.length - offset);
79 | if (numRead < 0) {
80 | break;
81 | }
82 | offset += numRead;
83 | }
84 | if (offset >= bytes.length) {
85 | return bytes;
86 | }
87 | throw new IOException("Could not completely read file: " + path);
88 | }
89 | throw new FileTooLarge(path, max_len);
90 | } finally {
91 | is.close();
92 | }
93 | }
94 |
95 | public static boolean deleteFile(String path) {
96 | if (path != null) {
97 | return new File(path).delete();
98 | }
99 | return false;
100 | }
101 |
102 | public static boolean renameFile(String from_path, String to_path) {
103 | if (from_path == null || to_path == null) {
104 | return false;
105 | }
106 | return new File(from_path).renameTo(new File(to_path));
107 | }
108 |
109 | public static String basename(String path) {
110 | if (path != null) {
111 | return new File(path).getName();
112 | }
113 | return null;
114 | }
115 |
116 | public static String dirname(String path) {
117 | if (path != null) {
118 | return new File(path).getParent();
119 | }
120 | return null;
121 | }
122 |
123 | public static String uriBasename(Uri uri) {
124 | if (uri != null) {
125 | return uri.getLastPathSegment();
126 | }
127 | return null;
128 | }
129 | }
130 |
--------------------------------------------------------------------------------
/app/src/main/java/net/openvpn/openvpn/OpenVPNAddProxy.java:
--------------------------------------------------------------------------------
1 | package net.openvpn.openvpn;
2 |
3 | import android.content.Intent;
4 | import android.os.Bundle;
5 | import android.preference.PreferenceManager;
6 | import android.util.Log;
7 | import android.view.KeyEvent;
8 | import android.view.View;
9 | import android.view.View.OnClickListener;
10 | import android.widget.Button;
11 | import android.widget.CheckBox;
12 | import android.widget.EditText;
13 | import android.widget.TextView;
14 | import android.widget.TextView.OnEditorActionListener;
15 | import net.openvpn.openvpn.ProxyList.Item;
16 |
17 | public class OpenVPNAddProxy extends OpenVPNClientBase implements OnClickListener, OnEditorActionListener {
18 | private static final String TAG = "OpenVPNAddProxy";
19 | CheckBox allow_cleartext_auth_checkbox;
20 | Button cancel_button;
21 | EditText friendly_name_edit;
22 | EditText host_edit;
23 | String mod_proxy_name;
24 | EditText port_edit;
25 | private PrefUtil prefs;
26 | Button save_button;
27 | TextView title_textview;
28 |
29 | public void onCreate(Bundle savedInstanceState) {
30 | super.onCreate(savedInstanceState);
31 | setContentView(R.layout.add_proxy);
32 | this.prefs = new PrefUtil(PreferenceManager.getDefaultSharedPreferences(this));
33 | this.title_textview = (TextView) findViewById(R.id.proxy_title);
34 | this.friendly_name_edit = (EditText) findViewById(R.id.proxy_friendly_name);
35 | this.host_edit = (EditText) findViewById(R.id.proxy_host);
36 | this.port_edit = (EditText) findViewById(R.id.proxy_port);
37 | this.allow_cleartext_auth_checkbox = (CheckBox) findViewById(R.id.proxy_allow_cleartext_auth_checkbox);
38 | this.save_button = (Button) findViewById(R.id.proxy_save_button);
39 | this.cancel_button = (Button) findViewById(R.id.proxy_cancel_button);
40 | this.save_button.setOnClickListener(this);
41 | this.cancel_button.setOnClickListener(this);
42 | this.port_edit.setOnEditorActionListener(this);
43 | doBindService();
44 | }
45 |
46 | public void onClick(View v) {
47 | Log.d(TAG, "onClick");
48 | int viewid = v.getId();
49 | if (viewid == R.id.proxy_save_button) {
50 | ProxyList proxy_list = get_proxy_list();
51 | if (proxy_list != null) {
52 | Item item = new Item();
53 | String friendly_name = this.friendly_name_edit.getText().toString().trim();
54 | if (friendly_name.length() > 0) {
55 | item.friendly_name = friendly_name;
56 | }
57 | item.host = this.host_edit.getText().toString().trim();
58 | item.port = this.port_edit.getText().toString().trim();
59 | item.allow_cleartext_auth = this.allow_cleartext_auth_checkbox.isChecked();
60 | if (item.is_valid()) {
61 | String name = item.name();
62 | if (!name.equals(this.mod_proxy_name)) {
63 | proxy_list.remove(this.mod_proxy_name);
64 | }
65 | proxy_list.put(item);
66 | proxy_list.set_enabled(name);
67 | proxy_list.save();
68 | gen_ui_reset_event(false);
69 | finish();
70 | return;
71 | }
72 | return;
73 | }
74 | Log.d(TAG, "proxy_list is null on save!");
75 | finish();
76 | } else if (viewid == R.id.proxy_cancel_button) {
77 | finish();
78 | }
79 | }
80 |
81 | public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
82 | if (!action_enter(actionId, event) || v != this.port_edit) {
83 | return false;
84 | }
85 | onClick(this.save_button);
86 | return true;
87 | }
88 |
89 | protected void onDestroy() {
90 | Log.d(TAG, "onDestroy");
91 | stop();
92 | super.onDestroy();
93 | }
94 |
95 | private void stop() {
96 | doUnbindService();
97 | }
98 |
99 | protected void post_bind() {
100 | Intent intent = getIntent();
101 | if (intent != null) {
102 | this.mod_proxy_name = intent.getStringExtra("net.openvpn.openvpn.PROXY_NAME");
103 | if (this.mod_proxy_name != null) {
104 | this.title_textview.setText(R.string.proxy_title_modify);
105 | }
106 | ProxyList proxy_list = get_proxy_list();
107 | if (this.mod_proxy_name != null && proxy_list != null) {
108 | Item item = proxy_list.get(this.mod_proxy_name);
109 | if (item != null) {
110 | if (item.friendly_name != null) {
111 | this.friendly_name_edit.setText(item.friendly_name);
112 | }
113 | this.host_edit.setText(item.host);
114 | this.port_edit.setText(item.port);
115 | this.allow_cleartext_auth_checkbox.setChecked(item.allow_cleartext_auth);
116 | }
117 | }
118 | }
119 | }
120 | }
121 |
--------------------------------------------------------------------------------
/app/src/main/java/net/openvpn/openvpn/OpenVPNProxyCreds.java:
--------------------------------------------------------------------------------
1 | package net.openvpn.openvpn;
2 |
3 | import android.content.Intent;
4 | import android.os.Bundle;
5 | import android.os.Handler;
6 | import android.os.SystemClock;
7 | import android.preference.PreferenceManager;
8 | import android.util.Log;
9 | import android.view.KeyEvent;
10 | import android.view.View;
11 | import android.view.View.OnClickListener;
12 | import android.widget.Button;
13 | import android.widget.CheckBox;
14 | import android.widget.EditText;
15 | import android.widget.TextView;
16 | import android.widget.TextView.OnEditorActionListener;
17 |
18 | public class OpenVPNProxyCreds extends OpenVPNClientBase implements OnClickListener, OnEditorActionListener {
19 | private static final String TAG = "OpenVPNProxyCreds";
20 | Button cancel_button;
21 | Button ok_button;
22 | EditText password_edit;
23 | private PrefUtil prefs;
24 | TextView prev_creds_not_accepted_textview;
25 | String profile_name;
26 | String proxy_name;
27 | TextView proxy_title_textview;
28 | CheckBox remember_creds_checkbox;
29 | private Handler ui_reset_timer_handler = new Handler();
30 | private Runnable ui_reset_timer_task = new Runnable() {
31 | public void run() {
32 | OpenVPNProxyCreds.this.gen_proxy_context_expired_event();
33 | OpenVPNProxyCreds.this.finish();
34 | }
35 | };
36 | EditText username_edit;
37 |
38 | public void onCreate(Bundle savedInstanceState) {
39 | super.onCreate(savedInstanceState);
40 | setContentView(R.layout.proxy_creds);
41 | this.prefs = new PrefUtil(PreferenceManager.getDefaultSharedPreferences(this));
42 | this.prev_creds_not_accepted_textview = (TextView) findViewById(R.id.prev_creds_not_accepted);
43 | this.proxy_title_textview = (TextView) findViewById(R.id.proxy_creds_title);
44 | this.username_edit = (EditText) findViewById(R.id.proxy_username);
45 | this.password_edit = (EditText) findViewById(R.id.proxy_password);
46 | this.remember_creds_checkbox = (CheckBox) findViewById(R.id.proxy_remember_creds);
47 | this.ok_button = (Button) findViewById(R.id.proxy_ok_button);
48 | this.cancel_button = (Button) findViewById(R.id.proxy_cancel_button);
49 | this.ok_button.setOnClickListener(this);
50 | this.cancel_button.setOnClickListener(this);
51 | this.password_edit.setOnEditorActionListener(this);
52 | doBindService();
53 | }
54 |
55 | public void onClick(View v) {
56 | Log.d(TAG, "onClick");
57 | int viewid = v.getId();
58 | if (viewid == R.id.proxy_ok_button) {
59 | if (!(this.proxy_name == null || this.profile_name == null)) {
60 | String prefix = OpenVPNService.INTENT_PREFIX;
61 | startService(new Intent(this, OpenVPNService.class).setAction(OpenVPNService.ACTION_SUBMIT_PROXY_CREDS).putExtra(prefix + ".PROFILE", this.profile_name).putExtra(prefix + ".PROXY_NAME", this.proxy_name).putExtra(prefix + ".PROXY_USERNAME", this.username_edit.getText().toString()).putExtra(prefix + ".PROXY_PASSWORD", this.password_edit.getText().toString()).putExtra(prefix + ".PROXY_REMEMBER_CREDS", this.remember_creds_checkbox.isChecked()));
62 | }
63 | finish();
64 | } else if (viewid == R.id.proxy_cancel_button) {
65 | finish();
66 | }
67 | }
68 |
69 | public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
70 | if (!action_enter(actionId, event) || v != this.password_edit) {
71 | return false;
72 | }
73 | onClick(this.ok_button);
74 | return true;
75 | }
76 |
77 | private void cancel_ui_reset() {
78 | this.ui_reset_timer_handler.removeCallbacks(this.ui_reset_timer_task);
79 | }
80 |
81 | private void schedule_ui_reset(long delay) {
82 | cancel_ui_reset();
83 | this.ui_reset_timer_handler.postDelayed(this.ui_reset_timer_task, delay);
84 | }
85 |
86 | protected void onDestroy() {
87 | Log.d(TAG, "onDestroy");
88 | cancel_ui_reset();
89 | stop();
90 | super.onDestroy();
91 | }
92 |
93 | private void stop() {
94 | doUnbindService();
95 | }
96 |
97 | protected void post_bind() {
98 | Intent intent = getIntent();
99 | if (intent != null) {
100 | this.profile_name = intent.getStringExtra("net.openvpn.openvpn.PROFILE");
101 | this.proxy_name = intent.getStringExtra("net.openvpn.openvpn.PROXY_NAME");
102 | if (this.proxy_name != null) {
103 | this.proxy_title_textview.setText(String.format(resString(R.string.proxy_creds_title), new Object[]{this.proxy_name}));
104 | if (intent.getIntExtra("net.openvpn.openvpn.N_RETRIES", 0) > 0) {
105 | this.prev_creds_not_accepted_textview.setVisibility(0);
106 | }
107 | long expires = intent.getLongExtra("net.openvpn.openvpn.EXPIRES", 0);
108 | if (expires > 0) {
109 | long remaining_time = expires - SystemClock.elapsedRealtime();
110 | if (remaining_time > 0) {
111 | schedule_ui_reset(remaining_time);
112 | return;
113 | } else {
114 | finish();
115 | return;
116 | }
117 | }
118 | return;
119 | }
120 | finish();
121 | }
122 | }
123 | }
124 |
--------------------------------------------------------------------------------
/app/src/main/java/net/openvpn/openvpn/PrefUtil.java:
--------------------------------------------------------------------------------
1 | package net.openvpn.openvpn;
2 |
3 | import android.content.SharedPreferences;
4 | import android.content.SharedPreferences.Editor;
5 | import android.util.Log;
6 | import java.util.Set;
7 |
8 | public class PrefUtil {
9 | private static final String TAG = "PrefUtil";
10 | private SharedPreferences mSettings;
11 |
12 | private Object pkey;
13 |
14 | PrefUtil(SharedPreferences prefs) {
15 | this.mSettings = prefs;
16 | }
17 |
18 | public boolean contains_key(String key) {
19 | return this.mSettings.contains(key);
20 | }
21 |
22 | public String get_string(String key) {
23 | try {
24 | String value = this.mSettings.getString(key, null);
25 | Log.d(TAG, String.format("get_string: %s='%s'", new Object[]{key, value}));
26 | return value;
27 | } catch (ClassCastException e) {
28 | Log.d(TAG, String.format("get_string %s class cast exception", new Object[]{key}));
29 | return null;
30 | }
31 | }
32 |
33 | public Set get_string_set(String key) {
34 | try {
35 | Set value = this.mSettings.getStringSet(key, null);
36 | Log.d(TAG, String.format("get_string_set: %s='%s'", new Object[]{key, value}));
37 | return value;
38 | } catch (ClassCastException e) {
39 | Log.d(TAG, String.format("get_string_set %s class cast exception", new Object[]{key}));
40 | return null;
41 | }
42 | }
43 |
44 | public boolean get_boolean(String key, boolean default_value) {
45 | try {
46 | boolean value = this.mSettings.getBoolean(key, default_value);
47 | Log.d(TAG, String.format("get_boolean: %s=%b", new Object[]{key, Boolean.valueOf(value)}));
48 | return value;
49 | } catch (ClassCastException e) {
50 | Log.d(TAG, String.format("get_boolean %s class cast exception", new Object[]{key}));
51 | return default_value;
52 | }
53 | }
54 |
55 | public void set_string(String key, String value) {
56 | Editor editor = this.mSettings.edit();
57 | editor.putString(key, value);
58 | Log.d(TAG, String.format("set_string: %s='%s'", new Object[]{key, value}));
59 | editor.apply();
60 | }
61 |
62 | public void set_string_set(String key, Set value) {
63 | Editor editor = this.mSettings.edit();
64 | editor.putStringSet(key, value);
65 | Log.d(TAG, String.format("set_string: %s='%s'", new Object[]{key, value}));
66 | editor.apply();
67 | }
68 |
69 | public void set_boolean(String key, boolean value) {
70 | Editor editor = this.mSettings.edit();
71 | editor.putBoolean(key, value);
72 | Log.d(TAG, String.format("set_boolean: %s=%b", new Object[]{key, Boolean.valueOf(value)}));
73 | editor.apply();
74 | }
75 |
76 | public String get_string_by_profile(String profile_name, String key) {
77 | try {
78 | String value = this.mSettings.getString(key_by_profile(profile_name, key), null);
79 | Log.d(TAG, String.format("get_string_by_profile: key='%s' value='%s'", new Object[]{pkey, value}));
80 | return value;
81 | } catch (ClassCastException e) {
82 | Log.d(TAG, "get_string_by_profile class cast exception");
83 | return null;
84 | }
85 | }
86 |
87 | public void set_string_by_profile(String profile_name, String key, String value) {
88 | Editor editor = this.mSettings.edit();
89 | String pkey = key_by_profile(profile_name, key);
90 | Log.d(TAG, String.format("set_string_by_profile: key='%s' value='%s'", new Object[]{pkey, value}));
91 | editor.putString(pkey, value);
92 | editor.apply();
93 | }
94 |
95 | public boolean get_boolean_by_profile(String profile_name, String key, boolean default_value) {
96 | try {
97 | boolean value = this.mSettings.getBoolean(key_by_profile(profile_name, key), default_value);
98 | Log.d(TAG, String.format("get_boolean_by_profile: key='%s' value=%b", new Object[]{pkey, Boolean.valueOf(value)}));
99 | return value;
100 | } catch (ClassCastException e) {
101 | Log.d(TAG, "get_boolean_by_profile class cast exception");
102 | return default_value;
103 | }
104 | }
105 |
106 | public void set_boolean_by_profile(String profile_name, String key, boolean value) {
107 | Editor editor = this.mSettings.edit();
108 | String pkey = key_by_profile(profile_name, key);
109 | Log.d(TAG, String.format("set_boolean_by_profile: key='%s' value=%b", new Object[]{pkey, Boolean.valueOf(value)}));
110 | editor.putBoolean(pkey, value);
111 | editor.apply();
112 | }
113 |
114 | public void delete_key(String key) {
115 | Editor editor = this.mSettings.edit();
116 | Log.d(TAG, String.format("delete_key: key='%s'", new Object[]{key}));
117 | editor.remove(key);
118 | editor.apply();
119 | }
120 |
121 | public void delete_key_by_profile(String profile_name, String key) {
122 | Editor editor = this.mSettings.edit();
123 | String pkey = key_by_profile(profile_name, key);
124 | Log.d(TAG, String.format("delete_key_by_profile: key='%s'", new Object[]{pkey}));
125 | editor.remove(pkey);
126 | editor.apply();
127 | }
128 |
129 | private String key_by_profile(String profile_name, String key) {
130 | return String.format("%s.%s", new Object[]{key, profile_name});
131 | }
132 | }
133 |
--------------------------------------------------------------------------------