Bug Fixes

Bug Fixes
master
Abdul Mannan Saeed 2023-02-25 16:07:20 +05:00
parent a273c2d889
commit 3070ec0b9f
73 changed files with 1254 additions and 612 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="11" />
<bytecodeTargetLevel target="19" />
</component>
</project>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="deploymentTargetDropDown">
<runningDeviceTargetSelectedWithDropDown>
<Target>
<type value="RUNNING_DEVICE_TARGET" />
<deviceKey>
<Key>
<type value="VIRTUAL_DEVICE_PATH" />
<value value="C:\Users\msman\.android\avd\Pixel_6_Pro_API_33.avd" />
</Key>
</deviceKey>
</Target>
</runningDeviceTargetSelectedWithDropDown>
<timeTargetWasSelectedWithDropDown value="2023-02-25T10:45:48.329718700Z" />
</component>
</project>

View File

@ -7,6 +7,7 @@
<option name="testRunner" value="GRADLE" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="19" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />

View File

@ -4,6 +4,9 @@
<inspection_tool class="AndroidDomInspection" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="AndroidLintPxUsage" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="AndroidLintSuspiciousImport" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="AutoCloseableResource" enabled="true" level="WARNING" enabled_by_default="true">
<option name="METHOD_MATCHER_CONFIG" value="java.util.Formatter,format,java.io.Writer,append,com.google.common.base.Preconditions,checkNotNull,org.hibernate.Session,close,java.io.PrintWriter,printf,java.io.PrintStream,printf,android.content.Context,obtainStyledAttributes" />
</inspection_tool>
<inspection_tool class="BooleanMethodIsAlwaysInverted" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="BusyWait" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="CatchMayIgnoreException" enabled="false" level="WARNING" enabled_by_default="false" />

View File

@ -179,5 +179,5 @@
</value>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_18" project-jdk-name="11" project-jdk-type="JavaSDK" />
</project>

View File

@ -1,5 +1,6 @@
25a8c13da7993b03825942fe7b22a98f
fd38d80abf402c0cce74ac84b578f259
290c7ef397aa241b98bf9cf07be6584f
4df96d3bc9afd17b812e65e6c6add1ef
974322f19d813702ea048d95288d2b8c
29015bbfcc182d80e7f75bd2c38e4521

View File

@ -1,3 +1,3 @@
#Wed Feb 15 00:42:23 PKT 2023
#Sat Feb 25 16:05:10 PKT 2023
\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000=
json=337604914
json=2083951825

View File

@ -1,6 +1,6 @@
#
#Wed Feb 15 01:32:40 PKT 2023
#Sat Feb 25 16:05:10 PKT 2023
\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000=
pCPe4EeU2ZQVwQPeHLgseRqHBX1V5pvo9Piuu4J809dRhadEgukXa1A8po_UeXu5hmPOTaP1v4QPaMKIEOhh50=hGlhanpemGqPOKKAgaXvhyxwZaG9uD68csy1OadWTNhEgKvBWR7-7KSpyFr6nfZ4KMOuBBV5J49s2LLSg-SVxg
sdk_analysis_plugin_version=4.8.5
set_multidex=true
pCPe4EeU2ZQVwQPeHLgseRqHBX1V5pvo9Piuu4J809dRhadEgukXa1A8po_UeXu5hmPOTaP1v4QPaMKIEOhh50=hGlhanpemGqPOKKAgaXvhyxwZaG9uD68csy1OadWTNhEgKvBWR7-7KSpyFr6nfZ4KMOuBBV5J49s2LLSg-SVxg

View File

@ -0,0 +1 @@
o/jetified-OrbotLib-runtime

View File

@ -121,6 +121,7 @@ dependencies {
implementation "net.zetetic:android-database-sqlcipher:4.4.3"
implementation project(':xcrash_lib')
implementation 'com.karumi:dexter:6.2.3'
}

View File

@ -4,7 +4,7 @@
<!-- Permissions -->
<permission android:name="android.permission.MEDIA_CONTENT_CONTROL" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="27" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="28" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
@ -30,7 +30,7 @@
<activity
android:launchMode="singleTask"
android:name="com.hiddenservices.onionservices.appManager.advertManager.advertController"
android:name="com.hiddenservices.onionservices.appManager.unproxiedConnectionManager.unproxiedConnectionController"
android:exported="true" />
<activity

View File

@ -15,7 +15,6 @@ prefs:
browser.cache.disk.enable: true
browser.cache.memory.enable: false
browser.cache.disk.capacity: 10000000
privacy.resistFingerprinting: true
privacy.donottrackheader.enabled: false
privacy.donottrackheader.value: 1
network.http.sendRefererHeader: 0
@ -51,6 +50,4 @@ prefs:
privacy.clearOnShutdown.passwords: true
privacy.clearOnShutdown.sessions: true
privacy.clearOnShutdown.siteSettings: true
privacy.resistFingerprinting: false

View File

@ -15,7 +15,6 @@ prefs:
browser.cache.disk.enable: true
browser.cache.memory.enable: false
browser.cache.disk.capacity: 1000000000
privacy.resistFingerprinting: true
privacy.donottrackheader.enabled: false
privacy.donottrackheader.value: 1
network.http.sendRefererHeader: 0
@ -51,6 +50,4 @@ prefs:
privacy.clearOnShutdown.passwords: true
privacy.clearOnShutdown.sessions: true
privacy.clearOnShutdown.siteSettings: true
privacy.resistFingerprinting: false

View File

@ -1,84 +0,0 @@
package com.hiddenservices.onionservices.appManager.advertManager;
import androidx.appcompat.app.AppCompatActivity;
import android.annotation.SuppressLint;
import android.os.Bundle;
import android.view.View;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import android.widget.ProgressBar;
import com.hiddenservices.onionservices.R;
import com.hiddenservices.onionservices.eventObserver;
import java.util.Collections;
import java.util.List;
public class advertController extends AppCompatActivity {
WebView mWebView;
ProgressBar mProgressBar;
advertViewController mAdvertViewController;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_adview_controller);
initializeViews();
onInitializeAdvertisements();
onInitAdvert();
}
private void initializeViews() {
mWebView = findViewById(R.id.pWebView);
mProgressBar = findViewById(R.id.mProgressBar);
mAdvertViewController = new advertViewController(this, null, mProgressBar);
}
@SuppressLint("SetJavaScriptEnabled")
void onInitAdvert() {
mWebView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
mWebView.getSettings().setDomStorageEnabled(true);
mWebView.getSettings().setGeolocationEnabled(true);
mWebView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
mWebView.getSettings().setUseWideViewPort(true);
mWebView.getSettings().setDatabaseEnabled(true);
mWebView.getSettings().setLoadWithOverviewMode(true);
mWebView.getSettings().setUseWideViewPort(true);
mWebView.getSettings().setJavaScriptEnabled(true);
}
private void onInitializeAdvertisements() {
String mURL = getIntent().getExtras().getString("m_url");
if(mURL.contains("play.google.com")){
mWebView.setWebChromeClient(new WebChromeClient());
mWebView.loadUrl(mURL);
finish();
}else {
mWebView.setWebViewClient(new advertWebViewClient(new webivewViewCallback()));
mWebView.loadUrl(mURL);
}
}
/* Helper Methods */
public void onClose(View view) {
finish();
}
/* Callbacks */
public class webivewViewCallback implements eventObserver.eventListener {
@Override
public Object invokeObserver(List<Object> data, Object event_type) {
if (event_type.equals(advertEnums.eAdvertClientCallback.M_UPDATE_PROGRESSBAR)) {
mAdvertViewController.onTrigger(advertEnums.eAdvertViewController.M_UPDATE_PROGRESSBAR, Collections.singletonList(data.get(0)));
}
return null;
}
}
}

View File

@ -1,12 +0,0 @@
package com.hiddenservices.onionservices.appManager.advertManager;
class advertEnums {
/*History Manager*/
public enum eAdvertClientCallback {
M_UPDATE_PROGRESSBAR
}
public enum eAdvertViewController {
M_UPDATE_PROGRESSBAR
}
}

View File

@ -48,7 +48,6 @@ class bridgeModel {
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_STRING, Arrays.asList(keys.BRIDGE_CUSTOM_BRIDGE_1, status.sBridgeCustomBridge));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_STRING, Arrays.asList(keys.BRIDGE_CUSTOM_TYPE, status.sBridgeCustomType));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_GATEWAY_MANUAL, status.sBridgeGatewayManual));
pluginController.getInstance().onOrbotInvoke(Collections.singletonList("custom"), pluginEnums.eOrbotManager.M_UPDATE_BRIDGE_LIST);
}
@ -60,7 +59,6 @@ class bridgeModel {
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_STRING, Arrays.asList(keys.BRIDGE_CUSTOM_BRIDGE_1, status.sBridgeCustomBridge));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_STRING, Arrays.asList(keys.BRIDGE_CUSTOM_TYPE, status.sBridgeCustomType));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_GATEWAY_MANUAL, status.sBridgeGatewayManual));
pluginController.getInstance().onOrbotInvoke(Collections.singletonList("meek"), pluginEnums.eOrbotManager.M_UPDATE_BRIDGE_LIST);
}

View File

@ -12,7 +12,7 @@ import androidx.appcompat.app.AppCompatActivity;
import com.hiddenservices.onionservices.R;
import com.hiddenservices.onionservices.appManager.activityContextManager;
import com.hiddenservices.onionservices.appManager.advertManager.advertController;
import com.hiddenservices.onionservices.appManager.unproxiedConnectionManager.unproxiedConnectionController;
import com.hiddenservices.onionservices.appManager.homeManager.homeController.homeController;
import com.hiddenservices.onionservices.constants.constants;
import com.hiddenservices.onionservices.constants.keys;
@ -35,11 +35,13 @@ public class externalURLNavigationContoller extends AppCompatActivity {
{
if (mData[0] !=null && status.sIsBackgroundAdvertCheck) {
status.sIsBackgroundAdvertCheck = false;
Intent myIntent = new Intent(activityContextManager.getInstance().getHomeController(), advertController.class);
Intent myIntent = new Intent(activityContextManager.getInstance().getHomeController(), unproxiedConnectionController.class);
myIntent.putExtra(keys.ADVERT_URL, mData[0].toString());
myIntent.addFlags(FLAG_ACTIVITY_NO_ANIMATION);
myIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
activityContextManager.getInstance().getHomeController().onAdvertClickPauseSession();
activityContextManager.getInstance().getHomeController().startActivity(myIntent);
} else {
if (mData[0] == null) {
mData[0] = Uri.parse(constants.CONST_BACKEND_GENESIS_URL);

View File

@ -4,13 +4,16 @@ package com.hiddenservices.onionservices.appManager.homeManager.geckoManager.del
import androidx.annotation.NonNull;
import androidx.annotation.UiThread;
import androidx.appcompat.app.AppCompatActivity;
import com.hiddenservices.onionservices.appManager.homeManager.geckoManager.dataModel.geckoDataModel;
import com.hiddenservices.onionservices.appManager.homeManager.geckoManager.geckoSession;
import com.hiddenservices.onionservices.appManager.homeManager.geckoManager.helperClasses.intentHandler;
import com.hiddenservices.onionservices.appManager.homeManager.homeController.homeEnums;
import com.hiddenservices.onionservices.eventObserver;
import com.hiddenservices.onionservices.helperManager.helperMethod;
import org.mozilla.geckoview.GeckoSession;
import java.lang.ref.WeakReference;
import java.util.Arrays;
@ -19,7 +22,7 @@ public class historyDelegate implements GeckoSession.HistoryDelegate {
/*Private Variables*/
private WeakReference<AppCompatActivity> mContext;
private GeckoSession.HistoryDelegate.HistoryList mHistory = null;
private HistoryList mHistory = null;
private eventObserver.eventListener mEvent;
private geckoDataModel mGeckoDataModel;
private geckoSession mGeckoSession;
@ -35,20 +38,29 @@ public class historyDelegate implements GeckoSession.HistoryDelegate {
}
@UiThread
public void onHistoryStateChange(@NonNull GeckoSession var1, @NonNull GeckoSession.HistoryDelegate.HistoryList var2) {
if(mHistory !=null && mHistory.size()!=var2.size()){
mHistory = var2;
setURL(mHistory.get(mHistory.getCurrentIndex()).getUri());
public void onHistoryStateChange(@NonNull GeckoSession var1, @NonNull HistoryList var2) {
boolean mHistoryChanged = false;
if(mHistory!=null){
mHistoryChanged = mHistory.size()!=var2.size() || mHistory.size()!=var2.getCurrentIndex();
}
if(mHistory==null || mHistory.size()!=var2.size()){
//mGeckoDataModel.mTheme = null;
}
mHistory = var2;
if(mHistory !=null){
if(mHistoryChanged){
if(!mHistory.get(mHistory.getCurrentIndex()).getUri().equals("about:blank")){
setURL(mHistory.get(mHistory.getCurrentIndex()).getUri());
}
}
mEvent.invokeObserver(Arrays.asList(mHistory, mGeckoDataModel.mSessionID), homeEnums.eGeckoCallback.ON_URL_LOAD);
if(mCurrentIndex != var2.getCurrentIndex()){
if(mCurrentIndex != var2.getCurrentIndex() && mHistoryChanged){
mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mCurrentURL, mGeckoDataModel.mSessionID, mHistory.get(mHistory.getCurrentIndex()).getTitle(), mGeckoDataModel.mCurrentURL_ID, mGeckoDataModel.mTheme, mGeckoSession), homeEnums.eGeckoCallback.ON_UPDATE_SEARCH_BAR);
}
Object mID = mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mCurrentURL, mGeckoDataModel.mSessionID, mHistory.get(mHistory.getCurrentIndex()).getTitle(), -1, mGeckoDataModel.mTheme, mGeckoSession, false), homeEnums.eGeckoCallback.ON_UPDATE_HISTORY);
if (mID != null) {
mGeckoDataModel.mCurrentURL_ID = (int) mID;
}
}else {
mHistory = var2;
}
mCurrentIndex = var2.getCurrentIndex();
}

View File

@ -123,6 +123,8 @@ public class mediaSessionDelegate implements MediaSession.Delegate{
else if(pCommands.equals(enums.MediaController.SKIP_FORWARD)){
mMediaSession.nextTrack();
}
}else {
mMediaDelegate.onHideDefaultNotification();
}
}
}

View File

@ -139,6 +139,9 @@ public class navigationDelegate implements GeckoSession.NavigationDelegate {
public GeckoResult<String> onLoadError(@NonNull GeckoSession var1, @Nullable String var2, @NonNull WebRequestError var3) {
try {
if(var2==null){
var2 = this.mGeckoDataModel.mCurrentURL;
}
mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mCurrentURL, mGeckoDataModel.mSessionID, mGeckoDataModel.mCurrentTitle, mGeckoDataModel.mCurrentURL_ID, mGeckoDataModel.mTheme, mGeckoSession), homeEnums.eGeckoCallback.ON_DESTROY_MEDIA);
if (helperMethod.getHost(var2).endsWith(".onion")) {
var2 = var2.replace("www.", "");
@ -154,7 +157,7 @@ public class navigationDelegate implements GeckoSession.NavigationDelegate {
if (status.sSettingIsAppStarted && orbotLocalConstants.mIsTorInitialized) {
errorHandler handler = new errorHandler();
mEvent.invokeObserver(Arrays.asList(var2, mGeckoDataModel.mSessionID), homeEnums.eGeckoCallback.ON_LOAD_ERROR);
mGeckoDataModel.mTheme = null;
//mGeckoDataModel.mTheme = null;
mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mCurrentURL, mGeckoDataModel.mSessionID, mGeckoDataModel.mCurrentTitle, mGeckoDataModel.mTheme), homeEnums.eGeckoCallback.ON_UPDATE_THEME);
InputStream mResourceURL = null;

View File

@ -0,0 +1,105 @@
package com.hiddenservices.onionservices.appManager.homeManager.geckoManager.delegateModel;
import android.Manifest;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Build;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.content.ContextCompat;
import com.hiddenservices.onionservices.R;
import com.hiddenservices.onionservices.appManager.homeManager.geckoManager.geckoSession;
import java.lang.ref.WeakReference;
import java.util.Locale;
import org.mozilla.geckoview.GeckoSession;
import org.mozilla.geckoview.GeckoSession.PermissionDelegate;
public class permissionDelegate implements PermissionDelegate {
public int androidPermissionRequestCode = 1;
private WeakReference<AppCompatActivity> mContext;
private geckoSession mGeckoSession;
public permissionDelegate(WeakReference<AppCompatActivity> pContext, geckoSession pGeckoSession){
this.mContext = pContext;
this.mGeckoSession = pGeckoSession;
}
@Override
public void onAndroidPermissionsRequest(final GeckoSession session, final String[] permissions, final Callback callback) {
if (Build.VERSION.SDK_INT >= 23) {
// requestPermissions was introduced in API 23.
mContext.get().requestPermissions(permissions, androidPermissionRequestCode);
} else {
callback.grant();
}
}
private String[] normalizeMediaName(final MediaSource[] sources) {
if (sources == null) {
return null;
}
String[] res = new String[sources.length];
for (int i = 0; i < sources.length; i++) {
final int mediaSource = sources[i].source;
final String name = sources[i].name;
if (MediaSource.SOURCE_CAMERA == mediaSource) {
if (name.toLowerCase(Locale.ROOT).contains("front")) {
res[i] = "Front Camera";
} else {
res[i] = "Back Camera";
}
} else if (!name.isEmpty()) {
res[i] = name;
} else if (MediaSource.SOURCE_MICROPHONE == mediaSource) {
res[i] = "Microphone";
} else {
res[i] = "Other";
}
}
return res;
}
@Override
public void onMediaPermissionRequest(
final GeckoSession session,
final String uri,
final MediaSource[] video,
final MediaSource[] audio,
final MediaCallback callback) {
// If we don't have device permissions at this point, just automatically reject the request
// as we will have already have requested device permissions before getting to this point
// and if we've reached here and we don't have permissions then that means that the user
// denied them.
if ((audio != null
&& ContextCompat.checkSelfPermission(
mContext.get(), Manifest.permission.RECORD_AUDIO)
!= PackageManager.PERMISSION_GRANTED)
|| (video != null
&& ContextCompat.checkSelfPermission(
mContext.get(), Manifest.permission.CAMERA)
!= PackageManager.PERMISSION_GRANTED)) {
callback.reject();
return;
}
final String host = Uri.parse(uri).getAuthority();
final String title;
if (audio == null) {
title = "Request Video";
} else if (video == null) {
title = "Request Audio";
} else {
title = "Request Media";
}
String[] videoNames = normalizeMediaName(video);
String[] audioNames = normalizeMediaName(audio);
final promptDelegate prompt =
(promptDelegate) mGeckoSession.getPromptDelegate();
prompt.onMediaPrompt(session, title, video, audio, videoNames, audioNames, callback);
}
}

View File

@ -26,7 +26,7 @@ public class progressDelegate implements GeckoSession.ProgressDelegate {
private SecurityInformation securityInfo = null;
private GeckoSession.SessionState mSessionState;
private boolean mIsLoaded = false;
private int mProgress = 0;
private int mProgress = 5;
/*Initializations*/
@ -34,11 +34,13 @@ public class progressDelegate implements GeckoSession.ProgressDelegate {
this.mContext = pContext;
this.mEvent = pEvent;
this.mGeckoDataModel = pGeckoDataModel;
}
@UiThread
public void onSecurityChange(@NonNull final GeckoSession session, @NonNull final SecurityInformation securityInfo) {
this.securityInfo = securityInfo;
mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mSessionID, mGeckoDataModel.mCurrentTitle, mGeckoDataModel.mCurrentURL_ID, mGeckoDataModel.mTheme, securityInfo.isSecure, this), homeEnums.eGeckoCallback.M_UPDATE_SSL);
}
@Override
@ -47,7 +49,9 @@ public class progressDelegate implements GeckoSession.ProgressDelegate {
mProgress = progress;
if (progress <= 20) {
mContext.get().runOnUiThread(() -> mEvent.invokeObserver(Arrays.asList(5, mGeckoDataModel.mSessionID), homeEnums.eGeckoCallback.PROGRESS_UPDATE));
mContext.get().runOnUiThread(() -> {
mEvent.invokeObserver(Arrays.asList(5, mGeckoDataModel.mSessionID), homeEnums.eGeckoCallback.PROGRESS_UPDATE);
});
} else {
if (progress == 100) {
mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mSessionID, mGeckoDataModel.mCurrentTitle, mGeckoDataModel.mCurrentURL_ID, mGeckoDataModel.mTheme, this), homeEnums.eGeckoCallback.ON_INVOKE_PARSER);
@ -55,7 +59,9 @@ public class progressDelegate implements GeckoSession.ProgressDelegate {
checkApplicationRate();
}
}
mContext.get().runOnUiThread(() -> mEvent.invokeObserver(Arrays.asList(mProgress, mGeckoDataModel.mSessionID), homeEnums.eGeckoCallback.PROGRESS_UPDATE));
mContext.get().runOnUiThread(() -> {
mEvent.invokeObserver(Arrays.asList(mProgress, mGeckoDataModel.mSessionID), homeEnums.eGeckoCallback.PROGRESS_UPDATE);
});
}
}
}
@ -68,12 +74,21 @@ public class progressDelegate implements GeckoSession.ProgressDelegate {
@Override
public void onPageStart(@NonNull GeckoSession var1, @NonNull String var2) {
securityInfo = null;
mGeckoDataModel.mTheme = null;
mEvent.invokeObserver(Arrays.asList(5, mGeckoDataModel.mSessionID), homeEnums.eGeckoCallback.PROGRESS_UPDATE_FORCED);
mProgress = 5;
mEvent.invokeObserver(Arrays.asList(5, mGeckoDataModel.mSessionID), homeEnums.eGeckoCallback.PROGRESS_UPDATE);
if(var2.startsWith("jar:file")){
return;
}
mEvent.invokeObserver(Arrays.asList(var2, mGeckoDataModel.mSessionID, var2, mGeckoDataModel.mCurrentURL_ID, mGeckoDataModel.mTheme, null), homeEnums.eGeckoCallback.ON_UPDATE_SEARCH_BAR);
if (mIsLoaded) {
if (!mGeckoDataModel.mCurrentURL.equals("about:config") && !var2.equals("about:blank") && helperMethod.getHost(var2).endsWith(".onion")) {
var2 = var2.replace("www.", "");
//if (mIsLoaded) {
if (!mGeckoDataModel.mCurrentURL.equals("about:config") && !var2.equals("about:blank") && !var2.startsWith("jar:file")) {
if(helperMethod.getHost(var2).endsWith(".onion")){
var2 = var2.replace("www.", "");
}
this.mGeckoDataModel.mCurrentURL = var2;
}
if(mGeckoDataModel.mCurrentURL.replace("http","https://").equals(var2)){
@ -90,7 +105,7 @@ public class progressDelegate implements GeckoSession.ProgressDelegate {
mEvent.invokeObserver(Arrays.asList(var2, mGeckoDataModel.mSessionID), homeEnums.eGeckoCallback.SEARCH_UPDATE);
}
}
}
//}
}
@UiThread
@ -132,8 +147,16 @@ public class progressDelegate implements GeckoSession.ProgressDelegate {
return mProgress;
}
public void getProgress(int pProgress){
mProgress = pProgress;
public void resetProgress() {
mProgress = 5;
}
public boolean getSecurtityState(){
if(securityInfo==null){
return false;
}else {
return securityInfo.isSecure;
}
}
}

View File

@ -1,5 +1,7 @@
package com.hiddenservices.onionservices.appManager.homeManager.geckoManager.delegateModel;
import static android.provider.OpenableColumns.DISPLAY_NAME;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.AlertDialog;
@ -10,6 +12,7 @@ import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.res.TypedArray;
import android.database.Cursor;
import android.graphics.Color;
import android.graphics.PorterDuff;
import android.net.Uri;
@ -37,8 +40,12 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.ShareCompat;
import com.hiddenservices.onionservices.appManager.activityContextManager;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.nio.channels.FileChannel;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
@ -48,6 +55,7 @@ import java.util.Locale;
import org.mozilla.geckoview.AllowOrDeny;
import org.mozilla.geckoview.GeckoResult;
import org.mozilla.geckoview.GeckoSession;
import org.mozilla.geckoview.GeckoSession.PermissionDelegate.MediaSource;
import org.mozilla.geckoview.SlowScriptResponse;
public final class promptDelegate implements GeckoSession.PromptDelegate {
@ -57,7 +65,7 @@ public final class promptDelegate implements GeckoSession.PromptDelegate {
private FilePrompt mFilePrompt;
static final String LOGTAG = "BasicGeckoViewPrompt";
public int filePickerRequestCode = 1;
public int filePickerRequestCode = 115;
public promptDelegate(final AppCompatActivity activity) {
mActivity = activity;
@ -244,11 +252,14 @@ public final class promptDelegate implements GeckoSession.PromptDelegate {
private int getViewPadding(final AlertDialog.Builder builder) {
stopMedia();
final TypedArray attr = builder.getContext().obtainStyledAttributes(
new int[]{android.R.attr.listPreferredItemPaddingLeft});
final int padding = attr.getDimensionPixelSize(0, 1);
attr.recycle();
return padding;
try {
final TypedArray attr = builder.getContext().obtainStyledAttributes(
new int[]{android.R.attr.listPreferredItemPaddingLeft});
final int padding = attr.getDimensionPixelSize(0, 1);
attr.recycle();
return padding;
}catch (Exception ex){}
return 0;
}
private LinearLayout addStandardLayout(final AlertDialog.Builder builder,
@ -874,8 +885,9 @@ public final class promptDelegate implements GeckoSession.PromptDelegate {
return res;
}
@SuppressLint("Range")
public void onFileCallbackResult(final int resultCode, final Intent data) {
stopMedia();
if (mFileResponse == null) {
return;
}
@ -891,24 +903,66 @@ public final class promptDelegate implements GeckoSession.PromptDelegate {
return;
}
final Uri uri = data.getData();
Uri mURI = data.getData();
String result = null;
if (mURI.getScheme().equals("content")) {
Cursor cursor = mActivity.getContentResolver().query(mURI, null, null, null, null);
try {
if (cursor != null && cursor.moveToFirst()) {
result = cursor.getString(cursor.getColumnIndex(DISPLAY_NAME));
}
} finally {
cursor.close();
}
}
if (result == null) {
result = mURI.getPath();
int cut = result.lastIndexOf('/');
if (cut != -1) {
result = result.substring(cut + 1);
}
}
File myFile = new File(mActivity.getFilesDir(),result);
final ClipData clip = data.getClipData();
if (prompt.type == FilePrompt.Type.SINGLE ||
(prompt.type == FilePrompt.Type.MULTIPLE && clip == null)) {
res.complete(prompt.confirm(mActivity, uri));
} else if (prompt.type == FilePrompt.Type.MULTIPLE) {
if (clip == null) {
Log.w(LOGTAG, "No selected file");
res.complete(prompt.dismiss());
return;
try {
FileInputStream in = (FileInputStream) mActivity.getContentResolver().openInputStream(data.getData());
FileOutputStream out = new FileOutputStream(myFile);
FileChannel inChannel = in.getChannel();
FileChannel outChannel = out.getChannel();
inChannel.transferTo(0, inChannel.size(), outChannel);
in.close();
out.close();
} catch (Exception e) {}
final Uri uri = Uri.parse("file:///"+myFile.getAbsolutePath());
try {
if (prompt.type == FilePrompt.Type.SINGLE
|| (prompt.type == FilePrompt.Type.MULTIPLE && clip == null)) {
res.complete(prompt.confirm(mActivity, uri));
} else if (prompt.type == FilePrompt.Type.MULTIPLE) {
if (clip == null) {
Log.w(LOGTAG, "No selected file");
res.complete(prompt.dismiss());
return;
}
final int count = clip.getItemCount();
final ArrayList<Uri> uris = new ArrayList<>(count);
for (int i = 0; i < count; i++) {
uris.add(clip.getItemAt(i).getUri());
}
res.complete(prompt.confirm(mActivity, uris.toArray(new Uri[uris.size()])));
}
final int count = clip.getItemCount();
final ArrayList<Uri> uris = new ArrayList<>(count);
for (int i = 0; i < count; i++) {
uris.add(clip.getItemAt(i).getUri());
}
res.complete(prompt.confirm(mActivity, uris.toArray(new Uri[0])));
}catch (Exception ex){
int e=0;
e=1;
}
}
@ -944,29 +998,31 @@ public final class promptDelegate implements GeckoSession.PromptDelegate {
dialog.show();
}
private Spinner addMediaSpinner(final Context context, final ViewGroup container,
final GeckoSession.PermissionDelegate.MediaSource[] sources, final String[] sourceNames) {
final ArrayAdapter<GeckoSession.PermissionDelegate.MediaSource> adapter = new ArrayAdapter<GeckoSession.PermissionDelegate.MediaSource>(
context, android.R.layout.simple_spinner_item) {
private View convertView(final int position, final View view) {
if (view != null) {
((TextView) view).setText(sourceNames != null ? sourceNames[position] : "media");
}
return view;
}
private Spinner addMediaSpinner(
final Context context,
final ViewGroup container,
final MediaSource[] sources,
final String[] sourceNames) {
final ArrayAdapter<MediaSource> adapter =
new ArrayAdapter<MediaSource>(context, android.R.layout.simple_spinner_item) {
private View convertView(final int position, final View view) {
if (view != null) {
final MediaSource item = getItem(position);
((TextView) view).setText(sourceNames != null ? sourceNames[position] : item.name);
}
return view;
}
@Override
public View getView(final int position, View view,
final ViewGroup parent) {
return convertView(position, super.getView(position, view, parent));
}
@Override
public View getView(final int position, View view, final ViewGroup parent) {
return convertView(position, super.getView(position, view, parent));
}
@Override
public View getDropDownView(final int position, final View view,
@NonNull final ViewGroup parent) {
return convertView(position, super.getDropDownView(position, view, parent));
}
};
@Override
public View getDropDownView(final int position, final View view, final ViewGroup parent) {
return convertView(position, super.getDropDownView(position, view, parent));
}
};
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
adapter.addAll(sources);
@ -977,18 +1033,21 @@ public final class promptDelegate implements GeckoSession.PromptDelegate {
return spinner;
}
public void onMediaPrompt(final String title,
final GeckoSession.PermissionDelegate.MediaSource[] video, final GeckoSession.PermissionDelegate.MediaSource[] audio,
final String[] videoNames, final String[] audioNames,
final GeckoSession.PermissionDelegate.MediaCallback callback) {
public void onMediaPrompt(
final GeckoSession session,
final String title,
final MediaSource[] video,
final MediaSource[] audio,
final String[] videoNames,
final String[] audioNames,
final GeckoSession.PermissionDelegate.MediaCallback callback) {
final Activity activity = mActivity;
stopMedia();
if (activity == null || (video == null && audio == null)) {
callback.reject();
return;
}
final AlertDialog.Builder builder = new AlertDialog.Builder(activity);
final LinearLayout container = addStandardLayout(builder, title, null);
final LinearLayout container = addStandardLayout(builder, title, /* msg */ null);
final Spinner videoSpinner;
if (video != null) {
@ -1004,32 +1063,44 @@ public final class promptDelegate implements GeckoSession.PromptDelegate {
audioSpinner = null;
}
builder.setNegativeButton(android.R.string.cancel, null)
.setPositiveButton(android.R.string.ok,
(dialog, which) -> {
final GeckoSession.PermissionDelegate.MediaSource video1 = (videoSpinner != null)
? (GeckoSession.PermissionDelegate.MediaSource) videoSpinner.getSelectedItem() : null;
final GeckoSession.PermissionDelegate.MediaSource audio1 = (audioSpinner != null)
? (GeckoSession.PermissionDelegate.MediaSource) audioSpinner.getSelectedItem() : null;
callback.grant(video1, audio1);
builder
.setNegativeButton(android.R.string.cancel, /* listener */ null)
.setPositiveButton(
android.R.string.ok,
new DialogInterface.OnClickListener() {
@Override
public void onClick(final DialogInterface dialog, final int which) {
final MediaSource video =
(videoSpinner != null) ? (MediaSource) videoSpinner.getSelectedItem() : null;
final MediaSource audio =
(audioSpinner != null) ? (MediaSource) audioSpinner.getSelectedItem() : null;
callback.grant(video, audio);
}
});
final AlertDialog dialog = builder.create();
dialog.setOnDismissListener(dialog1 -> callback.reject());
dialog.setOnDismissListener(
new DialogInterface.OnDismissListener() {
@Override
public void onDismiss(final DialogInterface dialog) {
callback.reject();
}
});
dialog.show();
}
public void onMediaPrompt(final String title,
final GeckoSession.PermissionDelegate.MediaSource[] video, final GeckoSession.PermissionDelegate.MediaSource[] audio,
final GeckoSession.PermissionDelegate.MediaCallback callback) {
stopMedia();
onMediaPrompt(title, video, audio, null, null, callback);
public void onMediaPrompt(
final GeckoSession session,
final String title,
final MediaSource[] video,
final MediaSource[] audio,
final GeckoSession.PermissionDelegate.MediaCallback callback) {
onMediaPrompt(session, title, video, audio, null, null, callback);
}
@Override
public GeckoResult<PromptResponse> onPopupPrompt(@NonNull final GeckoSession session,
final PopupPrompt prompt) {
stopMedia();
public GeckoResult<PromptResponse> onPopupPrompt(
final GeckoSession session, final PopupPrompt prompt) {
return GeckoResult.fromValue(prompt.confirm(AllowOrDeny.ALLOW));
}
}

View File

@ -80,12 +80,12 @@ public class geckoClients {
}
private geckoSession initSettings(GeckoView pGeckoView, eventObserver.eventListener pEvent, AppCompatActivity pContext, String pSessionID){
geckoSession mSessionIbitializer = new geckoSession(new geckoViewClientCallback(), pSessionID, pContext, pGeckoView);
mSessionIbitializer.getSettings().setUseTrackingProtection(status.sStatusDoNotTrack);
mSessionIbitializer.getSettings().setFullAccessibilityTree(true);
mSessionIbitializer.getSettings().setUserAgentMode(USER_AGENT_MODE_MOBILE);
mSessionIbitializer.getSettings().setAllowJavascript(status.sSettingJavaStatus);
return mSessionIbitializer;
geckoSession mSessionInitializer = new geckoSession(new geckoViewClientCallback(), pSessionID, pContext, pGeckoView);
mSessionInitializer.getSettings().setUseTrackingProtection(status.sStatusDoNotTrack);
mSessionInitializer.getSettings().setFullAccessibilityTree(true);
mSessionInitializer.getSettings().setUserAgentMode(USER_AGENT_MODE_MOBILE);
mSessionInitializer.getSettings().setAllowJavascript(status.sSettingJavaStatus);
return mSessionInitializer;
}
public void initializeIcon(Context pcontext) {
@ -151,7 +151,7 @@ public class geckoClients {
dataController.getInstance().initializeListData();
onClearAll();
}
initializeIcon(context);
//initializeIcon(context);
}
public void onReload(geckoView mNestedGeckoView, AppCompatActivity pcontext, boolean isThemeCall, boolean isDelayed) {
@ -176,7 +176,8 @@ public class geckoClients {
mSession = pSession;
geckoView.releaseSession();
geckoView.setSession(pSession);
mSessionID = pSession.getSessionID();
mSession.initCallback(new geckoViewClientCallback());
this.mSessionID = mSession.getSessionID();
}
public void loadURL(String url, geckoView mNestedGeckoView, AppCompatActivity pcontext) {
@ -355,6 +356,7 @@ public class geckoClients {
mSession.goBackSession();
} else if (isFinishAllowed) {
if (mSession.isRemovableFromBackPressed() && mTabSize > 1) {
mSession.stop();
mEvent.invokeObserver(null, homeEnums.eGeckoCallback.M_CLOSE_TAB_BACK);
} else {
mEvent.invokeObserver(null, homeEnums.eGeckoCallback.BACK_LIST_EMPTY);
@ -462,6 +464,7 @@ public class geckoClients {
public class geckoViewClientCallback implements eventObserver.eventListener {
@Override
public Object invokeObserver(List<Object> data, Object e_type) {
mSessionID = activityContextManager.getInstance().getHomeController().getSessionID();
if (e_type.equals(homeEnums.eGeckoCallback.ON_FULL_SCREEN)) {
mSession.onFullScreenInvoke((boolean)data.get(0));
}
@ -475,7 +478,7 @@ public class geckoClients {
else if (mSession != null) {
if (e_type.equals(homeEnums.eGeckoCallback.SESSION_ID)) {
return mSession.getSessionID();
} else if (mSessionID != null && mSessionID.equals(data.get(1)) || e_type.equals(homeEnums.eGeckoCallback.ON_INVOKE_PARSER) || e_type.equals(homeEnums.eGeckoCallback.M_RATE_COUNT) || e_type.equals(homeEnums.eGeckoCallback.FINDER_RESULT_CALLBACK) || e_type.equals(homeEnums.eGeckoCallback.ON_UPDATE_TAB_TITLE) || e_type.equals(homeEnums.eGeckoCallback.ON_UPDATE_FAVICON) || e_type.equals(homeEnums.eGeckoCallback.ON_UPDATE_HISTORY) || e_type.equals(homeEnums.eGeckoCallback.ON_REQUEST_COMPLETED) || e_type.equals(homeEnums.eGeckoCallback.ON_UPDATE_SUGGESTION) || e_type.equals(homeEnums.eGeckoCallback.ON_UPDATE_SUGGESTION_URL)) {
} else if (mSessionID != null && mSessionID.equals(data.get(1)) || e_type.equals(homeEnums.eGeckoCallback.M_UPDATE_SSL) || e_type.equals(homeEnums.eGeckoCallback.ON_INVOKE_PARSER) || e_type.equals(homeEnums.eGeckoCallback.M_RATE_COUNT) || e_type.equals(homeEnums.eGeckoCallback.FINDER_RESULT_CALLBACK) || e_type.equals(homeEnums.eGeckoCallback.ON_UPDATE_TAB_TITLE) || e_type.equals(homeEnums.eGeckoCallback.ON_UPDATE_FAVICON) || e_type.equals(homeEnums.eGeckoCallback.ON_UPDATE_HISTORY) || e_type.equals(homeEnums.eGeckoCallback.ON_REQUEST_COMPLETED) || e_type.equals(homeEnums.eGeckoCallback.ON_UPDATE_SUGGESTION) || e_type.equals(homeEnums.eGeckoCallback.ON_UPDATE_SUGGESTION_URL)) {
if (mSession != null && mSession.getContentDelegate().isClosed()) {
return null;
}

View File

@ -5,6 +5,7 @@ import com.hiddenservices.onionservices.appManager.homeManager.geckoManager.data
import com.hiddenservices.onionservices.appManager.homeManager.geckoManager.delegateModel.autofillDelegate;
import com.hiddenservices.onionservices.appManager.homeManager.geckoManager.delegateModel.contentDelegate;
import com.hiddenservices.onionservices.appManager.homeManager.geckoManager.delegateModel.navigationDelegate;
import com.hiddenservices.onionservices.appManager.homeManager.geckoManager.delegateModel.permissionDelegate;
import com.hiddenservices.onionservices.appManager.homeManager.geckoManager.delegateModel.progressDelegate;
import com.hiddenservices.onionservices.appManager.homeManager.geckoManager.delegateModel.promptDelegate;
import com.hiddenservices.onionservices.appManager.homeManager.geckoManager.delegateModel.historyDelegate;
@ -42,20 +43,22 @@ public class geckoSession extends GeckoSession implements GeckoSession.Progress
private downloadHandler mDownloadHandler;
private searchHandler mSearchHandler;
private permissionDelegate mPermissionDelegate;
private boolean mIsRemovableOnBackPressed = false;
geckoSession(eventObserver.eventListener event, String pSessionID, AppCompatActivity mContext, GeckoView pGeckoView) {
geckoSession(eventObserver.eventListener pEvent, String pSessionID, AppCompatActivity pContext, GeckoView pGeckoView) {
this.mContext = new WeakReference(mContext);
this.mEvent = event;
this.mContext = new WeakReference(pContext);
this.mEvent = pEvent;
this.mGeckoDataModel = new geckoDataModel();
this.mGeckoDataModel.mSessionID = pSessionID;
this.mMediaDelegate = new mediaDelegate(this.mContext);
this.mSelectionActionDelegate = new selectionDelegate(mContext, true);
this.mSelectionActionDelegate = new selectionDelegate(pContext, true);
this.mMediaSessionDelegate = new mediaSessionDelegate(this.mContext, mGeckoDataModel, mMediaDelegate);
this.mHistoryDelegate = new historyDelegate(this.mContext, mEvent, mGeckoDataModel, this);
this.mPromptDelegate = new promptDelegate(mContext);
this.mPromptDelegate = new promptDelegate(this.mContext.get());
this.mContentDelegate = new contentDelegate(this.mContext, mEvent, mGeckoDataModel, this);
this.mScrollDelegate = new scrollDelegate(mEvent, mGeckoDataModel);
this.mAutofillDelegate = new autofillDelegate(pGeckoView);
@ -63,6 +66,7 @@ public class geckoSession extends GeckoSession implements GeckoSession.Progress
this.mSearchHandler = new searchHandler(mEvent, this);
this.mNavigationDelegate = new navigationDelegate(this.mContext, mEvent, mGeckoDataModel, this);
this.mProgressDelegate = new progressDelegate(this.mContext, mEvent, mGeckoDataModel);
this.mPermissionDelegate = new permissionDelegate(this.mContext, this);
setSelectionActionDelegate(this.mSelectionActionDelegate);
setMediaSessionDelegate(this.mMediaSessionDelegate);
@ -74,6 +78,11 @@ public class geckoSession extends GeckoSession implements GeckoSession.Progress
setAutofillDelegate(this.mAutofillDelegate);
setNavigationDelegate(this.mNavigationDelegate);
setProgressDelegate(this.mProgressDelegate);
setPermissionDelegate(this.mPermissionDelegate);
}
public void initCallback(eventObserver.eventListener pEvent) {
this.mEvent = pEvent;
}
public void initURL(String url) {
@ -84,7 +93,6 @@ public class geckoSession extends GeckoSession implements GeckoSession.Progress
mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mCurrentURL, mGeckoDataModel.mSessionID, mGeckoDataModel.mCurrentTitle), homeEnums.eGeckoCallback.ON_UPDATE_SUGGESTION);
}
/*Delegate Handler*/
public mediaSessionDelegate getMediaSessionDelegate(){
@ -188,6 +196,9 @@ public class geckoSession extends GeckoSession implements GeckoSession.Progress
}
/*Properties Getter Setter*/
public void resetProgress() {
mProgressDelegate.resetProgress();
}
public void setTheme(String pTheme) {
mGeckoDataModel.mTheme = pTheme;
}
@ -220,4 +231,8 @@ public class geckoSession extends GeckoSession implements GeckoSession.Progress
return mProgressDelegate.getProgress();
}
public boolean getSSL() {
return mProgressDelegate.getSecurtityState();
}
}

View File

@ -1,6 +1,8 @@
package com.hiddenservices.onionservices.appManager.homeManager.homeController;
import static android.os.Build.VERSION.SDK_INT;
import android.Manifest;
import android.annotation.SuppressLint;
import android.app.ActivityManager;
import android.app.DownloadManager;
@ -59,7 +61,7 @@ import androidx.lifecycle.OnLifecycleEvent;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.hiddenservices.onionservices.appManager.activityContextManager;
import com.hiddenservices.onionservices.appManager.advertManager.advertController;
import com.hiddenservices.onionservices.appManager.unproxiedConnectionManager.unproxiedConnectionController;
import com.hiddenservices.onionservices.appManager.bookmarkManager.bookmarkSettings.bookmarkSettingController;
import com.hiddenservices.onionservices.appManager.bookmarkManager.bookmarkHome.bookmarkController;
import com.hiddenservices.onionservices.appManager.editTextManager;
@ -91,6 +93,11 @@ import com.hiddenservices.onionservices.pluginManager.pluginController;
import com.hiddenservices.onionservices.pluginManager.pluginEnums;
import com.hiddenservices.onionservices.R;
import com.hiddenservices.onionservices.pluginManager.pluginReciever.defaultNotificationReciever;
import com.karumi.dexter.Dexter;
import com.karumi.dexter.MultiplePermissionsReport;
import com.karumi.dexter.PermissionToken;
import com.karumi.dexter.listener.PermissionRequest;
import com.karumi.dexter.listener.multi.MultiplePermissionsListener;
import com.widget.onionservices.widgetManager.widgetController;
import org.mozilla.geckoview.ContentBlocking;
import org.mozilla.geckoview.GeckoResult;
@ -116,6 +123,10 @@ import static com.hiddenservices.onionservices.appManager.homeManager.homeContro
import static com.hiddenservices.onionservices.appManager.homeManager.homeController.homeEnums.eHomeViewCallback.OPEN_NEW_TAB;
import static com.hiddenservices.onionservices.constants.constants.CONST_EXTERNAL_SHORTCUT_COMMAND_ERASE_OPEN;
import static com.hiddenservices.onionservices.constants.constants.CONST_EXTERNAL_SHORTCUT_COMMAND_RESTART;
import static com.hiddenservices.onionservices.constants.constants.CONST_GENESIS_BADCERT_CACHED;
import static com.hiddenservices.onionservices.constants.constants.CONST_GENESIS_BADCERT_CACHED_DARK;
import static com.hiddenservices.onionservices.constants.constants.CONST_GENESIS_ERROR_CACHED;
import static com.hiddenservices.onionservices.constants.constants.CONST_GENESIS_ERROR_CACHED_DARK;
import static com.hiddenservices.onionservices.constants.constants.CONST_GENESIS_HELP_URL_CACHE;
import static com.hiddenservices.onionservices.constants.constants.CONST_GENESIS_HELP_URL_CACHE_DARK;
import static com.hiddenservices.onionservices.constants.constants.CONST_GENESIS_URL_CACHED;
@ -256,8 +267,13 @@ public class homeController extends AppCompatActivity implements ComponentCallba
onMemoryCalculate();
pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_INIT_ADS);
mHomeViewController.updateBannerAdvertStatus(true, (boolean) pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED));
mHomeViewController.onSessionReinit();
if(status.mThemeApplying){
mGeckoClient.initRestore(mGeckoView, homeController.this);
}
}
@Override
protected void onStart() {
super.onStart();
@ -383,10 +399,19 @@ public class homeController extends AppCompatActivity implements ComponentCallba
}
public void onAdvertClick(View view) {
Intent myIntent = new Intent(this, advertController.class);
if(mGeckoClient!=null && mGeckoClient.getSession()!=null){
mGeckoClient.getSession().setActive(false);
}
Intent myIntent = new Intent(this, unproxiedConnectionController.class);
startActivity(myIntent);
}
public void onAdvertClickPauseSession() {
if(mGeckoClient!=null && mGeckoClient.getSession()!=null){
mGeckoClient.getSession().setActive(false);
}
}
public void initSuggestions() {
mSuggestions = (ArrayList<historyRowModel>) dataController.getInstance().invokeSuggestions(dataEnums.eSuggestionCommands.M_GET_SUGGESTIONS, Collections.singletonList(mSearchbar.getText().toString()));
}
@ -422,8 +447,6 @@ public class homeController extends AppCompatActivity implements ComponentCallba
onLoadURL(model.getSession().getCurrentURL());
}
mGeckoClient.initRestore(mGeckoView, homeController.this);
if (mGeckoClient.getSession().getCurrentURL().equals("about:blank") || mGeckoClient.getSession().getCurrentURL().contains("167.86.99.31") || mGeckoClient.getSession().getCurrentURL().startsWith(CONST_GENESIS_URL_CACHED) || mGeckoClient.getSession().getCurrentURL().startsWith(CONST_GENESIS_URL_CACHED_DARK) || mGeckoClient.getSession().getCurrentURL().startsWith(CONST_GENESIS_HELP_URL_CACHE) || mGeckoClient.getSession().getCurrentURL().startsWith(CONST_GENESIS_HELP_URL_CACHE_DARK)) {
mHomeViewController.updateBannerAdvertStatus(false, (boolean) pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED));
mHomeViewController.progressBarReset();
@ -770,12 +793,15 @@ public class homeController extends AppCompatActivity implements ComponentCallba
}
public void onLoadTabHidden(boolean isSessionClosed, boolean pExpandAppBar, boolean pForced, boolean pGeneratePixel) {
mHomeViewController.onNewTabAnimation(null, M_NEW_LINK_ANIMATION, 1000);
mHomeViewController.onNewTabAnimation(null, M_NEW_LINK_ANIMATION, 1000, mGeckoClient.getSession().getCurrentURL());
onLoadTab(mSessionNewTab, isSessionClosed, pExpandAppBar, pForced, pGeneratePixel);
}
public void onLoadTab(geckoSession mTempSession, boolean isSessionClosed, boolean pExpandAppBar, boolean pForced, boolean pGeneratePixel) {
mGeckoView.setPivotX(0);
mGeckoView.setPivotY(0);
//mHomeViewController.onResetTabAnimationInstant();
if(mGeckoClient.getSession() == null){
onNewTabInit();
}
@ -797,24 +823,31 @@ public class homeController extends AppCompatActivity implements ComponentCallba
mGeckoClient.onLoadTab(mTempSession, mGeckoView);
if (!mTempSession.isOpen()) {
mHomeViewController.onProgressBarUpdate(5, false, isStaticURL());
mTempSession.open(mGeckoClient.getmRuntime());
onLoadURL(mTempSession.getCurrentURL());
mGeckoView.getSession().setActive(true);
}else if(mTempSession.getProgress()<100){
mHomeViewController.onProgressBarUpdate(mTempSession.getProgress(), false, isStaticURL());
}else {
mProgressBar.setAlpha(0);
mProgressBar.setVisibility(View.GONE);
}
mHomeViewController.onClearSelections(false);
mHomeViewController.onUpdateSearchBar(mTempSession.getCurrentURL(), false, true, false);
if (mTempSession.getProgress() > 0 && mTempSession.getProgress() < 100) {
mHomeViewController.onProgressBarUpdate(mTempSession.getProgress(), false);
} else {
mHomeViewController.progressBarReset();
if(isStaticURL()){
mSearchbar.setText(mTempSession.getCurrentURL());
}
mHomeViewController.triggerUpdateSearchBar(mTempSession.getCurrentURL(), false, true, true);
//mHomeViewController.onUpdateSearchBar(mTempSession.getCurrentURL(), false, true, false);
//mGeckoClient.initRestore(mGeckoView, homeController.this);
mHomeViewController.onUpdateStatusBarTheme(mTempSession.getTheme(), false);
mHomeViewController.onUpdateSearchBar(mGeckoClient.getSession().getCurrentURL(), false, false, false);
//mHomeViewController.onUpdateSearchBar(mGeckoClient.getSession().getCurrentURL(), false, false, false);
mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getTheme(), false);
@ -837,11 +870,6 @@ public class homeController extends AppCompatActivity implements ComponentCallba
mHomeViewController.updateBannerAdvertStatus(true, (boolean) pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED));
}
//if(!pForced){
if (mGeckoClient.getSession().getProgress() != 100) {
mHomeViewController.onProgressBarUpdate(mTempSession.getProgress(), true);
}
//}
if(pGeneratePixel){
dataController.getInstance().invokeTab(dataEnums.eTabCommands.M_UPDATE_PIXEL, Arrays.asList(mGeckoClient.getSession().getSessionID(), mRenderedBitmap, null, mGeckoView, false));
}
@ -1091,14 +1119,18 @@ public class homeController extends AppCompatActivity implements ComponentCallba
@Override
protected void onDestroy() {
orbotLocalConstants.mAppForceExit = true;
NotificationManagerCompat.from(this).cancel(1030);
if (!status.mThemeApplying) {
NotificationManagerCompat.from(this).cancel(1030);
NotificationManagerCompat.from(this).cancel(1025);
}
if(manager!=null){
manager.cancel(1025);
}
NotificationManagerCompat.from(this).cancel(1025);
if(mGeckoClient.getSession() !=null){
mGeckoClient.getSession().getMediaSessionDelegate().onTrigger(enums.MediaController.DESTROY);
onHideDefaultNotification();
if(!status.mThemeApplying){
onHideDefaultNotification();
}
}
if (!status.sSettingIsAppStarted) {
mGeckoClient.onClearAll();
@ -1121,7 +1153,9 @@ public class homeController extends AppCompatActivity implements ComponentCallba
activityContextManager.getInstance().getHomeController().onResetData();
NotificationManagerCompat.from(this).cancel(1030);
if(!status.mThemeApplying){
NotificationManagerCompat.from(this).cancel(1030);
}
if (!status.mThemeApplying) {
status.sNoTorTriggered = false;
@ -1158,6 +1192,54 @@ public class homeController extends AppCompatActivity implements ComponentCallba
}
}
void onOpenSuggestion(){
new Handler().postDelayed(() ->
{
String mText = mSearchbar.getText().toString();
if (status.sSearchSuggestionStatus && isSuggestionChanged) {
String mURL = mSearchbar.getText().toString();
if (!mURL.equals(strings.GENERIC_EMPTY_STR) && isLetter(mSearchbar.getText().toString().charAt(0)) && mSearchbar.getText().toString().contains(".")) {
mHomeViewController.onUpdateSearchIcon(2);
} else {
mHomeViewController.onUpdateSearchIcon(0);
}
if (mSearchEngineBar.getVisibility() == View.GONE) {
mSearchBarLoadingOpening = true;
}
if (mSearchBarLoadingOpening) {
mSuggestions = (ArrayList<historyRowModel>) dataController.getInstance().invokeSuggestions(dataEnums.eSuggestionCommands.M_GET_DEFAULT_SUGGESTION, Collections.singletonList(mText));
mSearchBarPreviousText = mSearchbar.getText().toString();
mHomeViewController.onUpdateSearchEngineBar(true, 0);
onUpdateSuggestionList(mSuggestions);
mEdittextChanged.postDelayed(postToServerRunnable, 0);
mSearchBarLoadingOpening = true;
mSearchBarLoading = false;
mEdittextChanged.removeCallbacks(postToServerRunnable);
mSuggestions = (ArrayList<historyRowModel>) dataController.getInstance().invokeSuggestions(dataEnums.eSuggestionCommands.M_GET_SUGGESTIONS, Collections.singletonList(mText));
mEdittextChanged.postDelayed(postToServerRunnable, 150);
return;
}
if (mSuggestions.size() > 0) {
mSuggestions = (ArrayList<historyRowModel>) dataController.getInstance().invokeSuggestions(dataEnums.eSuggestionCommands.M_GET_SUGGESTIONS, Collections.singletonList(mText));
if (mHintListView.getAdapter() == null) {
initSuggestionView(mSuggestions, mText);
} else if (!mSearchBarLoadingOpening) {
mEdittextChanged.removeCallbacks(postToServerRunnable);
if (!mSearchBarLoading) {
mSearchBarLoading = true;
mEdittextChanged.postDelayed(postToServerRunnable, 0);
} else {
mEdittextChanged.postDelayed(postToServerRunnable, 150);
}
}
}
}
}, 200);
}
@RequiresApi(api = Build.VERSION_CODES.M)
@SuppressLint("ClickableViewAccessibility")
private void initializeLocalEventHandlers() {
@ -1279,54 +1361,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
if(status.sLowMemory == enums.MemoryStatus.CRITICAL_MEMORY){
return;
}
new Handler().postDelayed(() ->
{
String mText = mSearchbar.getText().toString();
if (status.sSearchSuggestionStatus && isSuggestionChanged) {
String mURL = mSearchbar.getText().toString();
if (!mURL.equals(strings.GENERIC_EMPTY_STR) && isLetter(mSearchbar.getText().toString().charAt(0)) && mSearchbar.getText().toString().contains(".")) {
mHomeViewController.onUpdateSearchIcon(2);
} else {
mHomeViewController.onUpdateSearchIcon(0);
}
if (mSearchEngineBar.getVisibility() == View.GONE) {
mSearchBarLoadingOpening = true;
}
if (mSearchBarLoadingOpening) {
mSuggestions = (ArrayList<historyRowModel>) dataController.getInstance().invokeSuggestions(dataEnums.eSuggestionCommands.M_GET_DEFAULT_SUGGESTION, Collections.singletonList(mText));
mSearchBarPreviousText = mSearchbar.getText().toString();
mHomeViewController.onUpdateSearchEngineBar(true, 0);
onUpdateSuggestionList(mSuggestions);
mEdittextChanged.postDelayed(postToServerRunnable, 0);
mSearchBarLoadingOpening = true;
mSearchBarLoading = false;
mEdittextChanged.removeCallbacks(postToServerRunnable);
mSuggestions = (ArrayList<historyRowModel>) dataController.getInstance().invokeSuggestions(dataEnums.eSuggestionCommands.M_GET_SUGGESTIONS, Collections.singletonList(mText));
mEdittextChanged.postDelayed(postToServerRunnable, 150);
return;
}
if (mSuggestions.size() > 0) {
mSuggestions = (ArrayList<historyRowModel>) dataController.getInstance().invokeSuggestions(dataEnums.eSuggestionCommands.M_GET_SUGGESTIONS, Collections.singletonList(mText));
if (mHintListView.getAdapter() == null) {
initSuggestionView(mSuggestions, mText);
} else if (!mSearchBarLoadingOpening) {
mEdittextChanged.removeCallbacks(postToServerRunnable);
if (!mSearchBarLoading) {
mSearchBarLoading = true;
mEdittextChanged.postDelayed(postToServerRunnable, 0);
} else {
mEdittextChanged.postDelayed(postToServerRunnable, 150);
}
}
}
}
}, 200);
onOpenSuggestion();
}
@Override
@ -1362,9 +1397,13 @@ public class homeController extends AppCompatActivity implements ComponentCallba
mSearchbar.setEventHandler(new edittextManagerCallback());
mSearchbar.setOnFocusChangeListener((v, hasFocus) -> {
if(mGeckoClient.getSession()==null){
return;
}
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
status.sUIInteracted = true;
if (!hasFocus) {
mHomeViewController.setSecurityColor();
msearchstatuscopy = false;
mSearchBarWasBackButtonPressed = true;
new Handler().postDelayed(() ->
@ -1379,9 +1418,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
mHomeViewController.onUpdateSearchEngineBar(false, 150);
}
mHomeViewController.initSearchBarFocus(false, isKeyboardOpened);
if(mProgressBar.getProgress()==0 || mProgressBar.getProgress()==100){
mHomeViewController.onUpdateSearchBar(mGeckoClient.getSession().getCurrentURL(), false, true, false);
}
mHomeViewController.onUpdateSearchBar(mGeckoClient.getSession().getCurrentURL(), false, true, false);
helperMethod.hideKeyboard(homeController.this);
}
}
@ -1392,10 +1429,9 @@ public class homeController extends AppCompatActivity implements ComponentCallba
if (!isFocusChanging) {
if (!status.mThemeApplying && mGeckoClient!=null && mGeckoClient.getSession()!=null) {
mHomeViewController.initSearchBarFocus(true, isKeyboardOpened);
if(mProgressBar.getProgress()==0 || mProgressBar.getProgress()==100){
mHomeViewController.onUpdateSearchBar(mGeckoClient.getSession().getCurrentURL(), true, true, false);
}
mHomeViewController.onUpdateSearchBar(mGeckoClient.getSession().getCurrentURL(), true, true, false);
}
onOpenSuggestion();
isSuggestionChanged = true;
isSuggestionSearchOpened = false;
}
@ -1463,6 +1499,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
}
public void onHomeButton(View view) {
if(mGeckoClient.getSession()!=null){
mGeckoClient.getSession().setTheme(null);
mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getTheme(), true);
@ -1470,7 +1507,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
int mCount = (int) dataController.getInstance().invokeTab(dataEnums.eTabCommands.GET_TOTAL_TAB, null);
}
if (status.sSettingDefaultSearchEngine.equals(constants.CONST_BACKEND_GENESIS_URL)) {
mHomeViewController.onNewTabAnimation(Collections.singletonList(helperMethod.getDomainName(mHomeModel.getSearchEngine())), homeEnums.eHomeViewCallback.M_HOME_BUTTON_PRESSED, 1000);
mHomeViewController.onNewTabAnimation(Collections.singletonList(helperMethod.getDomainName(mHomeModel.getSearchEngine())), homeEnums.eHomeViewCallback.M_HOME_BUTTON_PRESSED, 1000, mGeckoClient.getSession().getCurrentURL());
} else {
onLoadURL(helperMethod.getHost(status.sSettingDefaultSearchEngine));
}
@ -1532,9 +1569,9 @@ public class homeController extends AppCompatActivity implements ComponentCallba
}
public void postNewLinkTabAnimation(String url, boolean isRemovable) {
mHomeViewController.onNewTabAnimation(Collections.singletonList(helperMethod.getDomainName(mHomeModel.getSearchEngine())), null, 1000);
mHomeViewController.onNewTabAnimation(Collections.singletonList(helperMethod.getDomainName(mHomeModel.getSearchEngine())), null, 1000, mGeckoClient.getSession().getCurrentURL());
mGeckoView.releaseSession();
mHomeViewController.onProgressBarUpdate(5, true);
mHomeViewController.onProgressBarUpdate(5, true, isStaticURL());
dataController.getInstance().invokeTab(dataEnums.eTabCommands.M_UPDATE_PIXEL, Arrays.asList(mGeckoClient.getSession().getSessionID(), mRenderedBitmap, null, mGeckoView, false));
initializeGeckoView(true, true);
mHomeViewController.progressBarReset();
@ -1548,7 +1585,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
}
public void postNewLinkTabAnimationOpen(String url, boolean isRemovable) {
mHomeViewController.onProgressBarUpdate(5, true);
mHomeViewController.onProgressBarUpdate(5, true, isStaticURL());
dataController.getInstance().invokeTab(dataEnums.eTabCommands.M_UPDATE_PIXEL, Arrays.asList(mGeckoClient.getSession().getSessionID(), mRenderedBitmap, null, mGeckoView, false));
mGeckoClient.initializeSession(mGeckoView, new geckoViewCallback(), this);
mGeckoClient.onSaveCurrentTab(true);
@ -1572,7 +1609,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
initTabCount(homeEnums.eHomeViewCallback.M_NEW_LINK_IN_NEW_TAB, Collections.singletonList(url));
} else {
mHomeViewController.initTab((int) dataController.getInstance().invokeTab(dataEnums.eTabCommands.GET_TOTAL_TAB, null), false, null, null);
mHomeViewController.onNewTabAnimation(Collections.singletonList(url), homeEnums.eHomeViewCallback.M_NEW_LINK_IN_NEW_TAB_LOAD, 1000);
mHomeViewController.onNewTabAnimation(Collections.singletonList(url), homeEnums.eHomeViewCallback.M_NEW_LINK_IN_NEW_TAB_LOAD, 1000, mGeckoClient.getSession().getCurrentURL());
}
mGeckoView.destroyDrawingCache();
}
@ -1601,6 +1638,10 @@ public class homeController extends AppCompatActivity implements ComponentCallba
} catch (Exception ignored) {
}
if(!status.sOpenURLInNewTab){
mNewTabBlocker.setVisibility(View.VISIBLE);
mNewTabBlocker.setAlpha(1);
}
new Handler().postDelayed(() ->
{
dataController.getInstance().invokeTab(dataEnums.eTabCommands.M_UPDATE_PIXEL, Arrays.asList(mGeckoClient.getSession().getSessionID(), mRenderedBitmap, null, mGeckoView, false));
@ -1610,16 +1651,18 @@ public class homeController extends AppCompatActivity implements ComponentCallba
if (status.sOpenURLInNewTab) {
mGeckoClient.resetSession();
mHomeViewController.onUpdateSearchBar(helperMethod.getDomainName(mHomeModel.getSearchEngine()), false, false, false);
mHomeViewController.triggerUpdateSearchBar(helperMethod.getDomainName(mHomeModel.getSearchEngine()), false, true, true);
if (status.sSettingDefaultSearchEngine.startsWith("http://167.86.99.31")) {
mHomeViewController.progressBarReset();
mHomeViewController.onProgressBarUpdate(5, true, false);
} else {
mHomeViewController.onProgressBarUpdate(5, true);
mHomeViewController.onProgressBarUpdate(5, true, isStaticURL());
}
mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getTheme(), false);
}else {
mSearchbar.setText("about:blank");
}
mHomeViewController.onNewTabAnimation(Arrays.asList(isKeyboardOpenedTemp, isKeyboardOpened), homeEnums.eHomeViewCallback.M_INITIALIZE_TAB_SINGLE, 1000);
mHomeViewController.onNewTabAnimation(Arrays.asList(isKeyboardOpenedTemp, isKeyboardOpened), homeEnums.eHomeViewCallback.M_INITIALIZE_TAB_SINGLE, 1000, mGeckoClient.getSession().getCurrentURL());
}, 100);
}
@ -1635,12 +1678,12 @@ public class homeController extends AppCompatActivity implements ComponentCallba
if (status.sSettingDefaultSearchEngine.startsWith("http://167.86.99.31")) {
mHomeViewController.progressBarReset();
} else {
mHomeViewController.onProgressBarUpdate(5, true);
mHomeViewController.onProgressBarUpdate(5, true, isStaticURL());
}
mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getTheme(), true);
}
mHomeViewController.onNewTabAnimation(Arrays.asList(isKeyboardOpenedTemp, isKeyboardOpened), homeEnums.eHomeViewCallback.M_INITIALIZE_TAB_SINGLE, 1000);
mHomeViewController.onNewTabAnimation(Arrays.asList(isKeyboardOpenedTemp, isKeyboardOpened), homeEnums.eHomeViewCallback.M_INITIALIZE_TAB_SINGLE, 1000, mGeckoClient.getSession().getCurrentURL());
}
public String completeURL(String pURL) {
@ -1656,22 +1699,26 @@ public class homeController extends AppCompatActivity implements ComponentCallba
if (status.sSettingDefaultSearchEngine.startsWith("http://167.86.99.31") || !status.sOpenURLInNewTab || mGeckoClient.getSession().getCurrentURL().equals("about:blank") || mGeckoClient.getSession().getCurrentURL().contains("167.86.99.31") || mGeckoClient.getSession().getCurrentURL().startsWith(CONST_GENESIS_URL_CACHED) || mGeckoClient.getSession().getCurrentURL().startsWith(CONST_GENESIS_URL_CACHED_DARK) || mGeckoClient.getSession().getCurrentURL().startsWith(CONST_GENESIS_HELP_URL_CACHE) || mGeckoClient.getSession().getCurrentURL().startsWith(CONST_GENESIS_HELP_URL_CACHE_DARK)) {
mHomeViewController.updateBannerAdvertStatus(false, (boolean) pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED));
}
mHomeViewController.onNewTabAnimation(Collections.singletonList(url), homeEnums.eHomeViewCallback.M_INITIALIZE_TAB_LINK, 1000);
mHomeViewController.onNewTabAnimation(Collections.singletonList(url), homeEnums.eHomeViewCallback.M_INITIALIZE_TAB_LINK, 1000, mGeckoClient.getSession().getCurrentURL());
}, 100);
}
public void onOpenLinkNewTabLoaded(String url) {
mNewTab.setPressed(true);
mHomeViewController.onNewTabAnimation(Collections.singletonList(helperMethod.getDomainName(mHomeModel.getSearchEngine())), null, 1000);
final Handler handler = new Handler();
handler.postDelayed(() -> {
mHomeViewController.onNewTabAnimation(Collections.singletonList(helperMethod.getDomainName(mHomeModel.getSearchEngine())), null, 1000, mGeckoClient.getSession().getCurrentURL());
}, 150);
handler.postDelayed(() -> {
onGetThumbnail(null, false);
mHomeViewController.expandTopBar(false, mGeckoView.getMaxY());
if (status.sSettingDefaultSearchEngine.startsWith("http://167.86.99.31") || !status.sOpenURLInNewTab || mGeckoClient.getSession().getCurrentURL().equals("about:blank") || mGeckoClient.getSession().getCurrentURL().contains("167.86.99.31") || mGeckoClient.getSession().getCurrentURL().startsWith(CONST_GENESIS_URL_CACHED) || mGeckoClient.getSession().getCurrentURL().startsWith(CONST_GENESIS_URL_CACHED_DARK) || mGeckoClient.getSession().getCurrentURL().startsWith(CONST_GENESIS_HELP_URL_CACHE) || mGeckoClient.getSession().getCurrentURL().startsWith(CONST_GENESIS_HELP_URL_CACHE_DARK)) {
mHomeViewController.updateBannerAdvertStatus(false, (boolean) pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED));
}
mNewTab.setPressed(false);
mHomeViewController.onProgressBarUpdate(5, true);
mHomeViewController.onProgressBarUpdate(5, true, isStaticURL());
mGeckoClient.getSession().stop();
dataController.getInstance().invokeTab(dataEnums.eTabCommands.M_UPDATE_PIXEL, Arrays.asList(mGeckoClient.getSession().getSessionID(), mRenderedBitmap, null, mGeckoView, false));
mGeckoClient.initializeSession(mGeckoView, new geckoViewCallback(), this);
@ -1682,7 +1729,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
mGeckoClient.loadURL(url, mGeckoView, homeController.this);
initTabCountForced();
}, 100);
}, 300);
}
public void onClearSelectionTab() {
@ -1713,7 +1760,8 @@ public class homeController extends AppCompatActivity implements ComponentCallba
}
public void onLockSecure(View view) {
pluginController.getInstance().onMessageManagerInvoke(Arrays.asList(mGeckoClient.getSession().getCurrentURL(), status.sSettingJavaStatus, status.sStatusDoNotTrack, status.sSettingTrackingProtection, status.sSettingCookieStatus, getSecurityInfo(), mGeckoClient.getSession().getCurrentURL().startsWith("http://"), this), M_SECURE_CONNECTION);
boolean ssl = !mGeckoClient.getSession().getSSL();
pluginController.getInstance().onMessageManagerInvoke(Arrays.asList(mGeckoClient.getSession().getCurrentURL(), status.sSettingJavaStatus, status.sStatusDoNotTrack, status.sSettingTrackingProtection, status.sSettingCookieStatus, getSecurityInfo(), ssl, this), M_SECURE_CONNECTION);
}
public void onNotificationInvoked(String message, homeEnums.eHomeViewCallback e_type) {
@ -1918,7 +1966,8 @@ public class homeController extends AppCompatActivity implements ComponentCallba
TouchView(mGeckoView);
TouchView(mNestedScroll);
}
mNewTabBlocker.setAlpha(0);
mNewTabBlocker.setVisibility(View.GONE);
if (isSuggestionSearchOpened) {
isSuggestionChanged = true;
@ -1933,9 +1982,19 @@ public class homeController extends AppCompatActivity implements ComponentCallba
if (mGeckoView != null) {
tabRowModel model = (tabRowModel) dataController.getInstance().invokeTab(dataEnums.eTabCommands.GET_CURRENT_TAB, null);
if (model != null) {
if(model.getSession().getCurrentURL().equals("about:blank")){
//onLoadURL(model.getSession().getCurrentURL());
}
if (mGeckoView != null && mGeckoView.getSession() != null && !mGeckoView.getSession().isOpen()) {
onReDrawGeckoview();
onLoadURL(model.getSession().getCurrentURL());
mHomeViewController.onProgressBarUpdate(5,false, false);
mGeckoClient.getSession().resetProgress();
mProgressBar.setProgress(5);
mProgressBar.setVisibility(View.VISIBLE);
mProgressBar.setAlpha(1);
mProgressBar.bringToFront();
super.onResume();
}
}
}
@ -1965,6 +2024,9 @@ public class homeController extends AppCompatActivity implements ComponentCallba
mNewTab.setPressed(false);
//pluginController.getInstance().onMessageManagerInvoke(null, M_RESET);
}
if(mGeckoClient!=null && mGeckoClient.getSession()!=null){
mGeckoClient.getSession().setActive(true);
}
status.mThemeApplying = false;
@ -1996,25 +2058,18 @@ public class homeController extends AppCompatActivity implements ComponentCallba
tabRowModel model = (tabRowModel) dataController.getInstance().invokeTab(dataEnums.eTabCommands.GET_CURRENT_TAB, null);
if (model == null) {
mHomeViewController.onUpdateSearchBar(status.sSettingDefaultSearchEngine, false, true, false);
mHomeViewController.onProgressBarUpdate(5, false);
mHomeViewController.triggerUpdateSearchBar(status.sSettingDefaultSearchEngine, false, true, true);
//mHomeViewController.onUpdateSearchBar(status.sSettingDefaultSearchEngine, false, true, false);
mHomeViewController.onProgressBarUpdate(5, false, isStaticURL());
mGeckoView.releaseSession();
initializeGeckoView(false, false);
onLoadURL(helperMethod.getDomainName(status.sSettingDefaultSearchEngine));
if (mGeckoClient.getSession().getProgress() != 100) {
mHomeViewController.onProgressBarUpdate(mGeckoClient.getSession().getProgress(), true);
} else {
mProgressBar.setProgress(0);
}
mHomeViewController.onProgressBarUpdate(mGeckoClient.getSession().getProgress(), true, isStaticURL());
} else {
if (!model.getSession().getSessionID().equals(mGeckoClient.getSession().getSessionID())) {
onLoadTab(model.getSession(), false, true, false, true);
}
if (mGeckoClient.getSession().getProgress() != 100) {
mHomeViewController.onProgressBarUpdate(mGeckoClient.getSession().getProgress(), true);
} else {
mProgressBar.setProgress(0);
}
//mHomeViewController.onProgressBarUpdate(mGeckoClient.getSession().getProgress(), true, isStaticURL());
}
}
@ -2051,8 +2106,32 @@ public class homeController extends AppCompatActivity implements ComponentCallba
final Handler handler = new Handler();
handler.postDelayed(() -> mGeckoView.clearFocus(), 500);
}
} else if (requestCode == 1) {
mGeckoClient.onUploadRequest(resultCode, data);
} else if (requestCode == 115) {
Dexter.withContext(this)
.withPermissions(
Manifest.permission.CAMERA,
Manifest.permission.READ_CONTACTS,
Manifest.permission.MEDIA_CONTENT_CONTROL,
Manifest.permission.MANAGE_MEDIA,
Manifest.permission.ACCESS_MEDIA_LOCATION,
Manifest.permission.READ_MEDIA_AUDIO,
Manifest.permission.READ_MEDIA_VIDEO,
Manifest.permission.READ_MEDIA_IMAGES,
Manifest.permission.MANAGE_EXTERNAL_STORAGE,
Manifest.permission.READ_EXTERNAL_STORAGE,
Manifest.permission.WRITE_EXTERNAL_STORAGE,
Manifest.permission.RECORD_AUDIO
).withListener(new MultiplePermissionsListener() {
@Override
public void onPermissionsChecked(MultiplePermissionsReport multiplePermissionsReport) {
mGeckoClient.onUploadRequest(resultCode, data);
}
@Override
public void onPermissionRationaleShouldBeShown(List<PermissionRequest> list, PermissionToken permissionToken) {
}
}).check();
} else {
super.onActivityResult(requestCode, resultCode, data);
}
@ -2153,7 +2232,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
onLoadTabOnResume();
} else if (status.sSettingIsAppStarted) {
mHomeViewController.onPageFinished();
mHomeViewController.onProgressBarUpdate(5, false);
mHomeViewController.onProgressBarUpdate(5, false, isStaticURL());
onLoadTabOnResume();
}
}
@ -2466,7 +2545,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
}
if (menuId == R.id.menu22) {
helperMethod.hideKeyboard(this);
mHomeViewController.onProgressBarUpdate(5, true);
mHomeViewController.onProgressBarUpdate(5, true, isStaticURL());
mGeckoClient.onForwardPressed();
}
if (menuId == R.id.menu23) {
@ -2533,7 +2612,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
public void onReInitTheme() {
recreate();
//mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getTheme(), true);
mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getTheme(), true);
}
public void onResetData() {
@ -2711,19 +2790,17 @@ public class homeController extends AppCompatActivity implements ComponentCallba
initTabCountForced();
}
if (e_type.equals(homeEnums.eHomeViewCallback.M_GET_SSL_STATUS)) {
if(!mGeckoClient.getSession().getCurrentURL().startsWith("http") || mGeckoClient.getSession().getCurrentURL().contains(".onion") || mGeckoClient.getSession().getCurrentURL().contains("167.86.99.31")){
return true;
}
else if(mGeckoClient.getSession().getCurrentURL().startsWith("http://")){
if(mGeckoClient!=null && mGeckoClient.getSession()!=null){
return mGeckoClient.getSession().getSSL();
}else{
return false;
}else {
return true;
}
}
else if (e_type.equals(homeEnums.eHomeViewCallback.M_INIT_TOR)) {
pluginController.getInstance().onOrbotInvoke(Arrays.asList(status.sBridgeCustomBridge, status.sBridgeGatewayManual, status.sBridgeCustomType, status.sBridgeStatus, status.sShowImages, status.sClearOnExit, dataController.getInstance().invokeBridges(dataEnums.eBridgeWebsiteCommands.M_FETCH, null)), pluginEnums.eOrbotManager.M_START_ORBOT);
}
else if (e_type.equals(homeEnums.eGeckoCallback.M_CLOSE_TAB_BACK)) {
mHomeViewController.onProgressBarUpdate(100, true, false);
onCloseCurrentTab((geckoSession) data.get(0));
} else if (e_type.equals(homeEnums.eHomeViewCallback.M_ADVERT_LOADED)) {
return pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED);
@ -2840,7 +2917,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
} else if (status.sSettingIsAppStarted) {
mHomeViewController.onPageFinished();
//mGeckoClient.onRedrawPixel(homeController.this);
mHomeViewController.onProgressBarUpdate(5, false);
mHomeViewController.onProgressBarUpdate(5, false, isStaticURL());
onLoadTabOnResume();
}
}
@ -2992,6 +3069,18 @@ public class homeController extends AppCompatActivity implements ComponentCallba
Handler mHandler = null;
Handler mHandlerTheme = null;
boolean isStaticURL(){
if(mGeckoClient.getSession().getCurrentURL().equals("about:blank") || mGeckoClient.getSession().getCurrentURL().equals(CONST_PRIVACY_POLICY_URL_NON_TOR) || mGeckoClient.getSession().getCurrentURL().equals(CONST_GENESIS_URL_CACHED) || mGeckoClient.getSession().getCurrentURL().equals(CONST_GENESIS_URL_CACHED_DARK) || mGeckoClient.getSession().getCurrentURL().equals(CONST_GENESIS_ERROR_CACHED) || mGeckoClient.getSession().getCurrentURL().equals(CONST_GENESIS_ERROR_CACHED_DARK) || mGeckoClient.getSession().getCurrentURL().equals(CONST_GENESIS_BADCERT_CACHED) || mGeckoClient.getSession().getCurrentURL().equals(CONST_GENESIS_BADCERT_CACHED_DARK) || mGeckoClient.getSession().getCurrentURL().equals(CONST_GENESIS_HELP_URL_CACHE) || mGeckoClient.getSession().getCurrentURL().equals(CONST_GENESIS_HELP_URL_CACHE_DARK)){
return true;
}else {
return false;
}
}
public String getSessionID(){
return mGeckoClient.getSession().getSessionID();
}
public class geckoViewCallback implements eventObserver.eventListener {
@Override
@ -3014,11 +3103,11 @@ public class homeController extends AppCompatActivity implements ComponentCallba
mHomeViewController.updateBannerAdvertStatus((boolean) data.get(3), (boolean) mAdvertResponse);
}
} else if (e_type.equals(homeEnums.eGeckoCallback.PROGRESS_UPDATE)) {
mHomeViewController.onProgressBarUpdate((int) data.get(0), false);
mHomeViewController.onProgressBarUpdate((int) data.get(0), false, isStaticURL());
} else if (e_type.equals(homeEnums.eGeckoCallback.M_LOAD_HOMEPAGE_GENESIS)) {
onLoadURL(helperMethod.getDomainName(constants.CONST_BACKEND_GENESIS_URL));
} else if (e_type.equals(homeEnums.eGeckoCallback.PROGRESS_UPDATE_FORCED)) {
mHomeViewController.onProgressBarUpdate((int) data.get(0), true);
//mHomeViewController.onProgressBarUpdate((int) data.get(0), true, isStaticURL());
} else if (e_type.equals(homeEnums.eGeckoCallback.ON_UPDATE_SEARCH_BAR)) {
mHomeViewController.onUpdateSearchBar((String) data.get(0), false, false, false);
} else if (e_type.equals(homeEnums.eGeckoCallback.ON_FIRST_PAINT)) {
@ -3032,7 +3121,19 @@ public class homeController extends AppCompatActivity implements ComponentCallba
} else if (e_type.equals(homeEnums.eGeckoCallback.M_CLOSE_TAB)) {
onCloseCurrentTab(mGeckoClient.getSession());
} else if (e_type.equals(homeEnums.eGeckoCallback.M_CLOSE_TAB_BACK)) {
mHomeViewController.onNewTabAnimation(Collections.singletonList(mGeckoClient.getSession()), homeEnums.eGeckoCallback.M_CLOSE_TAB_BACK, 500);
if(mNewTabBlocker.getVisibility()==View.VISIBLE){
mHandlerTheme.postDelayed(() ->
{
mHomeViewController.onResetTabAnimationInstant();
}, 650);
}else{
mHomeViewController.onNewTabAnimation(Collections.singletonList(mGeckoClient.getSession()), homeEnums.eGeckoCallback.NULL, 500, mGeckoClient.getSession().getCurrentURL());
}
mHandlerTheme.postDelayed(() ->
{
onCloseCurrentTab(mGeckoClient.getSession());
}, 250);
//mHomeViewController.onProgressBarUpdate(100, false, false);
} else if (e_type.equals(homeEnums.eGeckoCallback.ON_UPDATE_THEME)) {
mHomeViewController.onResetTabAnimation();
if(mHandlerTheme == null){
@ -3094,7 +3195,11 @@ public class homeController extends AppCompatActivity implements ComponentCallba
if (!onCloseCurrentTab(mGeckoClient.getSession())) {
postNewTabAnimation(true, true);
}
} else if (e_type.equals(homeEnums.eGeckoCallback.ON_PLAYSTORE_LOAD)) {
}
else if (e_type.equals(homeEnums.eGeckoCallback.M_UPDATE_SSL)) {
mHomeViewController.setSecurityColor();
}
else if (e_type.equals(homeEnums.eGeckoCallback.ON_PLAYSTORE_LOAD)) {
helperMethod.openPlayStore(dataToStr(data.get(0)).split("__")[1], homeController.this);
} else if (e_type.equals(homeEnums.eGeckoCallback.ON_UPDATE_TAB_TITLE)) {
if (activityContextManager.getInstance().getTabController() != null && mTabFragment.getVisibility() == View.VISIBLE)

View File

@ -8,7 +8,7 @@ public class homeEnums {
}
public enum eGeckoCallback {
ON_FETCH_FAVICON, M_RELOAD, OPEN_NEW_TAB, M_DEFAULT_BROWSER, M_RATE_COUNT, M_INDEX_WEBSITE, ON_DESTROY_MEDIA, ON_HANDLE_EXTERNAL_INTENT, SESSION_ID, ON_LOAD_REQUEST, M_NEW_IDENTITY_MESSAGED, ON_UPDATE_SUGGESTION, M_NEW_IDENTITY, M_ORBOT_LOADING, M_UPDATE_PIXEL_BACKGROUND, M_OPEN_SESSION, M_ON_MAIL, FINDER_RESULT_CALLBACK, M_UPDATE_SESSION_STATE, ON_UPDATE_TAB_TITLE, ON_PLAYSTORE_LOAD, ON_CLOSE_SESSION, ON_LONG_PRESS, ON_UPDATE_FAVICON, ON_FULL_SCREEN, DOWNLOAD_FILE_POPUP, SEARCH_UPDATE, ON_LOAD_ERROR, ON_PAGE_LOADED, ON_UPDATE_HISTORY, START_PROXY, ON_UPDATE_THEME, M_CLOSE_TAB, BACK_LIST_EMPTY, ON_URL_LOAD, ON_SESSION_REINIT, ON_INVOKE_PARSER, ON_FIRST_PAINT, ON_UPDATE_SEARCH_BAR, PROGRESS_UPDATE_FORCED, M_LOAD_HOMEPAGE_GENESIS, PROGRESS_UPDATE, M_ON_BANNER_UPDATE, ON_EXPAND_TOP_BAR, M_ON_SCROLL_NO_BOUNDARIES, M_ON_SCROLL_TOP_BOUNDARIES, M_ON_SCROLL_BOUNDARIES, M_CLOSE_TAB_BACK, M_CHANGE_HOME_THEME, ON_UPDATE_SUGGESTION_URL, ON_REQUEST_COMPLETED, GECKO_SCROLL_DOWN, GECKO_SCROLL_UP_MOVE, WAS_SCROLL_CHANGED, GECKO_SCROLL_DOWN_MOVE, GECKO_SCROLL_UP_ALWAYS
ON_FETCH_FAVICON, M_RELOAD, OPEN_NEW_TAB, M_DEFAULT_BROWSER, M_RATE_COUNT, M_INDEX_WEBSITE, ON_DESTROY_MEDIA, ON_HANDLE_EXTERNAL_INTENT, SESSION_ID, ON_LOAD_REQUEST, M_NEW_IDENTITY_MESSAGED, ON_UPDATE_SUGGESTION, M_NEW_IDENTITY, M_ORBOT_LOADING, M_UPDATE_PIXEL_BACKGROUND, M_UPDATE_SSL, M_OPEN_SESSION, M_ON_MAIL, FINDER_RESULT_CALLBACK, M_UPDATE_SESSION_STATE, ON_UPDATE_TAB_TITLE, ON_PLAYSTORE_LOAD, ON_CLOSE_SESSION, ON_LONG_PRESS, ON_UPDATE_FAVICON, ON_FULL_SCREEN, DOWNLOAD_FILE_POPUP, SEARCH_UPDATE, ON_LOAD_ERROR, ON_PAGE_LOADED, ON_UPDATE_HISTORY, START_PROXY, NULL, ON_UPDATE_THEME, M_CLOSE_TAB, BACK_LIST_EMPTY, ON_URL_LOAD, ON_SESSION_REINIT, ON_INVOKE_PARSER, ON_FIRST_PAINT, ON_UPDATE_SEARCH_BAR, PROGRESS_UPDATE_FORCED, M_LOAD_HOMEPAGE_GENESIS, PROGRESS_UPDATE, M_ON_BANNER_UPDATE, ON_EXPAND_TOP_BAR, M_ON_SCROLL_NO_BOUNDARIES, M_ON_SCROLL_TOP_BOUNDARIES, M_ON_SCROLL_BOUNDARIES, M_CLOSE_TAB_BACK, M_CHANGE_HOME_THEME, ON_UPDATE_SUGGESTION_URL, ON_REQUEST_COMPLETED, GECKO_SCROLL_DOWN, GECKO_SCROLL_UP_MOVE, WAS_SCROLL_CHANGED, GECKO_SCROLL_DOWN_MOVE, GECKO_SCROLL_UP_ALWAYS
}
public enum eHintCallback {

View File

@ -24,7 +24,7 @@ public class homeModel {
if (pURL.startsWith(CONST_PRIVACY_POLICY_URL_NON_TOR)) {
return CONST_PRIVACY_POLICY_URL_NON_TOR;
}
if (pURL.startsWith("data")) {
if (pURL.startsWith("data") || pURL.startsWith("http://data") || pURL.startsWith("https://data")) {
return pURL;
}
if (pURL.equals("about:blank")) {

View File

@ -12,6 +12,7 @@ import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.Color;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.GradientDrawable;
import android.graphics.drawable.InsetDrawable;
@ -63,10 +64,17 @@ import java.util.List;
import java.util.Locale;
import java.util.concurrent.Callable;
import static android.content.Context.LAYOUT_INFLATER_SERVICE;
import static com.hiddenservices.onionservices.constants.constants.CONST_GENESIS_BADCERT_CACHED;
import static com.hiddenservices.onionservices.constants.constants.CONST_GENESIS_BADCERT_CACHED_DARK;
import static com.hiddenservices.onionservices.constants.constants.CONST_GENESIS_DOMAIN_URL;
import static com.hiddenservices.onionservices.constants.constants.CONST_GENESIS_ERROR_CACHED;
import static com.hiddenservices.onionservices.constants.constants.CONST_GENESIS_ERROR_CACHED_DARK;
import static com.hiddenservices.onionservices.constants.constants.CONST_GENESIS_HELP_URL_CACHE;
import static com.hiddenservices.onionservices.constants.constants.CONST_GENESIS_HELP_URL_CACHE_DARK;
import static com.hiddenservices.onionservices.constants.constants.CONST_GENESIS_URL_CACHED;
import static com.hiddenservices.onionservices.constants.constants.CONST_GENESIS_URL_CACHED_DARK;
import static com.hiddenservices.onionservices.constants.constants.CONST_PRIVACY_POLICY_URL_NON_TOR;
import static com.hiddenservices.onionservices.constants.status.sSearchSuggestionStatus;
import static com.hiddenservices.onionservices.constants.status.sSettingLanguage;
import static org.mozilla.geckoview.GeckoSessionSettings.USER_AGENT_MODE_DESKTOP;
import static java.lang.Thread.sleep;
@ -377,40 +385,42 @@ public class homeViewController {
@SuppressLint("UseCompatLoadingForDrawables")
public void onUpdateSearchIcon(int mStatus) {
try {
ssl_status = true;
if (mStatus == 0) {
mSearchLock.setColorFilter(null);
mSearchLock.clearColorFilter();
mSearchLock.setImageTintList(null);
mSearchLock.setImageDrawable(mContext.getResources().getDrawable(getSearchLogo()));
} else if (mStatus == 1) {
if (!(boolean) mSearchLock.getTag(R.id.themed)) {
mSearchLock.setColorFilter(ContextCompat.getColor(mContext, R.color.c_lock_tint));
mSearchLock.setImageDrawable(helperMethod.getDrawableXML(mContext, R.xml.ic_baseline_lock));
} else {
mSearchLock.setImageDrawable(helperMethod.getDrawableXML(mContext, R.xml.ic_baseline_lock));
}
} else if (mStatus == 2) {
mSearchLock.setColorFilter(ContextCompat.getColor(mContext, R.color.c_icon_tint));
mSearchLock.setImageDrawable(helperMethod.getDrawableXML(mContext, R.xml.ic_baseline_browser));
}
if(!mSearchbar.isFocused() && (mProgressBar.getProgress() == 0 || mProgressBar.getProgress() == 100)){
boolean ssl = (boolean)mEvent.invokeObserver(null, homeEnums.eHomeViewCallback.M_GET_SSL_STATUS);
if(ssl || status.sTorBrowsing){
mSearchLock.setColorFilter(ContextCompat.getColor(mContext, R.color.c_lock_tint));
}else {
mSearchLock.setColorFilter(Color.RED);
ssl_status = false;
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
public void setSecurityColor(){
mSearchLock.setColorFilter(null);
mSearchLock.clearColorFilter();
mSearchLock.setImageTintList(null);
mSearchLock.setImageDrawable(helperMethod.getDrawableXML(mContext, R.xml.ic_baseline_lock));
boolean ssl = (boolean)mEvent.invokeObserver(null, homeEnums.eHomeViewCallback.M_GET_SSL_STATUS);
if(ssl || status.sTorBrowsing){
if(helperMethod.getColorDensity(((ColorDrawable)mTopBar.getBackground()).getColor()) < 0.80){
mSearchLock.setColorFilter(ContextCompat.getColor(mContext, R.color.c_white));
}else {
mSearchLock.setColorFilter(ContextCompat.getColor(mContext, R.color.c_lock_tint));
}
ssl_status = true;
}else {
mSearchLock.setColorFilter(Color.argb(255, 255, 133, 102));
ssl_status = false;
}
}
@SuppressLint("UseCompatLoadingForDrawables")
public void initSearchBarFocus(boolean pStatus, boolean mIsKeyboardOpened) {
if (!pStatus) {
@ -657,9 +667,21 @@ public class homeViewController {
initSplashLoading();
});
mConnectNoTorButton.animate().setDuration(350).alpha(0.4f).withEndAction(() -> {});
mOrbotLogManager.animate().setDuration(350).alpha(0.4f).withEndAction(new Runnable() {
@Override
public void run() {
mOrbotLogManager.setEnabled(false);
}
});
}
mGatewaySplash.animate().setDuration(350).alpha(0.4f);
mGatewaySplash.animate().setDuration(350).alpha(0.4f).withEndAction(new Runnable() {
@Override
public void run() {
mGatewaySplash.setEnabled(false);
}
});
mPanicButtonLandscape.animate().setInterpolator(new AccelerateInterpolator()).setDuration(170).translationXBy(helperMethod.pxFromDp(55));
mPanicButton.animate().setDuration(170).setInterpolator(new AccelerateInterpolator()).translationXBy(helperMethod.pxFromDp(55));
}
@ -720,6 +742,7 @@ public class homeViewController {
}
mContext.runOnUiThread(() -> {
mLogHandler.cancel(true);
onProgressBarUpdate(5, true, false);
});
orbotLocalConstants.mIsTorInitialized = true;
@ -1120,25 +1143,27 @@ public class homeViewController {
private Handler searchBarUpdateHandler = new Handler();
private String handlerLocalUrl = "";
void onUpdateSearchBar(String url, boolean showProtocol, boolean pClearText, boolean pBypassFocus) {
private Handler mSearchUpdateHandler = null;
if (url.endsWith("genesisconfigurenewidentity.com/")) {
void onUpdateSearchBar(String url, boolean showProtocol, boolean pClearText, boolean pBypassFocus) {
String mURL = url;
if (mURL.endsWith("genesisconfigurenewidentity.com/")) {
return;
}
if (url.startsWith(CONST_PRIVACY_POLICY_URL_NON_TOR)) {
url = "https://orion.onion/privacy";
if (mURL.startsWith(CONST_PRIVACY_POLICY_URL_NON_TOR)) {
mURL = "https://orion.onion/privacy";
}
if (url.startsWith(CONST_GENESIS_URL_CACHED) || url.startsWith(CONST_GENESIS_URL_CACHED_DARK)) {
if (mURL.startsWith(CONST_GENESIS_URL_CACHED) || mURL.startsWith(CONST_GENESIS_URL_CACHED_DARK)) {
mSearchbar.setTag(R.id.msearchbarProcessing, true);
url = CONST_GENESIS_DOMAIN_URL;
mURL = CONST_GENESIS_DOMAIN_URL;
}
Log.i("FUCK::5", url);
Log.i("FUCK::5", mURL);
if (!mSearchbar.hasFocus() || pClearText || pBypassFocus) {
if (mSearchEngineBar.getVisibility() == View.GONE || pBypassFocus) {
int delay = 0;
handlerLocalUrl = url;
handlerLocalUrl = mURL;
if (searchBarUpdateHandler.hasMessages(100)) {
searchBarUpdateHandler.removeMessages(100);
@ -1146,7 +1171,7 @@ public class homeViewController {
searchBarUpdateHandler.sendEmptyMessage(100);
searchBarUpdateHandler.removeMessages(100);
triggerUpdateSearchBar(handlerLocalUrl, showProtocol, pClearText);
triggerUpdateSearchBar(handlerLocalUrl, showProtocol, pClearText, false);
mSearchbar.setTag(R.id.msearchbarProcessing, false);
}
}
@ -1281,6 +1306,7 @@ public class homeViewController {
mTopBarHider.setBackground(ContextCompat.getDrawable(mContext, R.color.c_background));
}
}
setSecurityColor();
}
public void onUpdateFindBar(boolean pStatus) {
@ -1345,52 +1371,77 @@ public class homeViewController {
}
}
private void triggerUpdateSearchBar(String url, boolean showProtocol, boolean pClearText) {
public void triggerUpdateSearchBar(String url, boolean showProtocol, boolean pClearText, boolean pForced) {
int mDelay = 0;
if(!mSearchbar.isFocused() || url.equals("about:blank") || url.equals(CONST_PRIVACY_POLICY_URL_NON_TOR) || url.equals(CONST_GENESIS_URL_CACHED) || url.equals(CONST_GENESIS_URL_CACHED_DARK) || url.equals(CONST_GENESIS_ERROR_CACHED) || url.equals(CONST_GENESIS_ERROR_CACHED_DARK) || url.equals(CONST_GENESIS_BADCERT_CACHED) || url.equals(CONST_GENESIS_BADCERT_CACHED_DARK) || url.equals(CONST_GENESIS_HELP_URL_CACHE) || url.equals(CONST_GENESIS_HELP_URL_CACHE_DARK)){
mDelay=300;
}
if(pForced){
mDelay = 0;
}
if(mSearchEngineBar.getVisibility() == View.VISIBLE){
mDelay = 0;
}
if (url.startsWith(CONST_PRIVACY_POLICY_URL_NON_TOR)) {
url = "https://orion.onion/privacy";
}
if (url.startsWith(CONST_GENESIS_URL_CACHED) || url.startsWith(CONST_GENESIS_URL_CACHED_DARK)) {
mSearchbar.setTag(R.id.msearchbarProcessing, true);
url = CONST_GENESIS_DOMAIN_URL;
}
if (mSearchbar == null || url == null) {
return;
}
if (!showProtocol) {
url = url.replace("https://", "");
url = url.replace("http://", "");
if (mSearchUpdateHandler != null) {
mSearchUpdateHandler.removeCallbacksAndMessages(null);
}
resource://android/assets/help/help.html
url = url.replace("167.86.99.31", "orion.onion");
url = url.replace("resource://android/assets/help/help.html", "orion.help");
url = url.replace("resource://android/assets/help/help-dark.html", "orion.help");
boolean isTextSelected = false;
if (mSearchbar.isSelected()) {
isTextSelected = true;
}
if (url.length() <= 300) {
url = removeEndingSlash(url);
if(status.sTorBrowsing){
mSearchbar.setText(helperMethod.urlDesigner(showProtocol, url, mContext, mSearchbar.getCurrentTextColor(), status.sTheme, true));
}else {
mSearchbar.setText(helperMethod.urlDesigner(showProtocol, url, mContext, mSearchbar.getCurrentTextColor(), status.sTheme, !ssl_status || url.contains("orion.onion")));
final String[] purl = {url};
mSearchUpdateHandler = new Handler();
mSearchUpdateHandler.postDelayed(() ->
{
if (!showProtocol) {
purl[0] = purl[0].replace("https://", "");
purl[0] = purl[0].replace("http://", "");
}
mSearchbar.selectAll();
if (isTextSelected) {
purl[0] = purl[0].replace("167.86.99.31", "orion.onion");
purl[0] = purl[0].replace("resource://android/assets/help/help.html", "orion.help");
purl[0] = purl[0].replace("resource://android/assets/help/help-dark.html", "orion.help");
boolean isTextSelected = false;
if (mSearchbar.isSelected()) {
isTextSelected = true;
}
if (purl[0].length() <= 300) {
purl[0] = removeEndingSlash(purl[0]);
if(status.sTorBrowsing){
mSearchbar.setText(helperMethod.urlDesigner(showProtocol, purl[0], mContext, mSearchbar.getCurrentTextColor(), status.sTheme, true));
}else {
mSearchbar.setText(helperMethod.urlDesigner(showProtocol, purl[0], mContext, mSearchbar.getCurrentTextColor(), status.sTheme, ssl_status || purl[0].contains("orion.onion")));
}
mSearchbar.selectAll();
if (isTextSelected) {
mSearchbar.selectAll();
}
mSearchbar.setSelection(0);
} else {
purl[0] = removeEndingSlash(purl[0]);
mSearchbar.setText(purl[0]);
}
if (mSearchbar.isFocused()) {
mSearchbar.setSelection(mSearchbar.getText().length());
mSearchbar.selectAll();
}
mSearchbar.setSelection(0);
} else {
url = removeEndingSlash(url);
mSearchbar.setText(url);
}
if (mSearchbar.isFocused()) {
mSearchbar.setSelection(mSearchbar.getText().length());
mSearchbar.selectAll();
}
if (mSearchbar.getText().toString().equals("loading")) {
mSearchbar.setText("about:blank");
}
if (mSearchbar.getText().toString().equals("loading")) {
mSearchbar.setText("about:blank");
}
}, mDelay);
}
private String removeEndingSlash(String url) {
@ -1422,11 +1473,15 @@ public class homeViewController {
}
public void onSessionReinit() {
mGeckoView.setForeground(ContextCompat.getDrawable(mContext, R.color.c_background));
}
void onProgressBarUpdate(int value, boolean mForced) {
void onProgressBarUpdate(int value, boolean mForced, boolean isStaticURL) {
//mProgressBar.animate().cancel();
if(mSearchbar.getText().toString().equals("about:blank") || (mSearchbar.getText().toString().equals(CONST_PRIVACY_POLICY_URL_NON_TOR) || mSearchbar.getText().toString().equals(CONST_GENESIS_URL_CACHED) || mSearchbar.getText().toString().equals(CONST_GENESIS_URL_CACHED_DARK) || mSearchbar.getText().toString().equals(CONST_GENESIS_ERROR_CACHED) || mSearchbar.getText().toString().equals(CONST_GENESIS_ERROR_CACHED_DARK) || mSearchbar.getText().toString().equals(CONST_GENESIS_BADCERT_CACHED) || mSearchbar.getText().toString().equals(CONST_GENESIS_BADCERT_CACHED_DARK) || mSearchbar.getText().toString().equals(CONST_GENESIS_HELP_URL_CACHE) || mSearchbar.getText().toString().equals(CONST_GENESIS_HELP_URL_CACHE_DARK)) && isStaticURL){
mProgressBar.setProgress(0);
return;
}
if (value == 105) {
progressAnimator.cancel();
mProgressBar.setAlpha(1);
@ -1452,16 +1507,6 @@ public class homeViewController {
progressAnimator.cancel();
}
if ((mSearchbar.getText().toString().equals("orion.onion/search?q=$s&p_num=1&s_type=all") || mSearchbar.getText().toString().equals("orion.onion")) && !mForced || (boolean) mSearchbar.getTag(R.id.msearchbarProcessing)) {
mProgressBar.setProgress(0);
mProgressBar.setVisibility(View.GONE);
return;
}
if (mSearchbar.getText().toString().equals("orion.onion") && !mForced) {
return;
}
mProgressBar.setVisibility(View.VISIBLE);
mProgressBar.setAlpha(1);
mProgressBar.animate().cancel();
@ -1473,6 +1518,7 @@ public class homeViewController {
setProgressAnimate(value, 200);
}
if (value >= 100 || value <= 0) {
mProgressBar.animate().alpha(0).setStartDelay(200).withEndAction(() -> {
status.sDisableExpandTemp = false;
mProgressBar.setProgress(0);
@ -1491,30 +1537,27 @@ public class homeViewController {
progressAnimator.start();
}
public void onNewTabAnimation(List<Object> data, Object e_type, int pDelay) {
public void onNewTabAnimation(List<Object> data, Object e_type, int pDelay, String pCurrentURL) {
if (mNewTabBlocker.getAlpha() != 0) {
return;
}
if(e_type!=null && e_type.equals(homeEnums.eHomeViewCallback.M_INITIALIZE_TAB_SINGLE) && !status.sOpenURLInNewTab){
pDelay = 2000;
}
new Handler().postDelayed(() ->
{
if(e_type!=null && e_type.equals(homeEnums.eGeckoCallback.M_CLOSE_TAB_BACK)){
if(e_type!=null && e_type.equals(homeEnums.eGeckoCallback.NULL) || e_type!=null && (e_type.equals(homeEnums.eGeckoCallback.M_CLOSE_TAB_BACK) || e_type.equals(homeEnums.eHomeViewCallback.M_INITIALIZE_TAB_SINGLE) && !status.sOpenURLInNewTab)){
onResetTabAnimation();
}
}, pDelay);
mGeckoView.setPivotX(0);
mGeckoView.setPivotY(0);
mNewTabBlocker.setVisibility(View.VISIBLE);
ObjectAnimator scaleDown = ObjectAnimator.ofPropertyValuesHolder(mGeckoView, PropertyValuesHolder.ofFloat("translationX", 0, helperMethod.pxFromDp(-50)));
ObjectAnimator alpha = ObjectAnimator.ofPropertyValuesHolder(mNewTabBlocker, PropertyValuesHolder.ofFloat("alpha", 0, 1f));
scaleDown.setDuration(150);
alpha.setDuration(150);
scaleDown.start();
alpha.start();
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP_MR1) {
@ -1523,14 +1566,13 @@ public class homeViewController {
mEvent.invokeObserver(data, e_type);
}, 300);
scaleDown.addListener(new Animator.AnimatorListener() {
alpha.addListener(new Animator.AnimatorListener() {
@Override
public void onAnimationStart(Animator animation, boolean isReverse) {
}
@Override
public void onAnimationEnd(Animator animation, boolean isReverse) {
scaleDown.removeAllListeners();
handler.removeCallbacksAndMessages(null);
mEvent.invokeObserver(data, e_type);
}
@ -1557,9 +1599,6 @@ public class homeViewController {
}
public void onHomeTabAnimation(List<Object> data, Object e_type) {
mGeckoView.setPivotX(0);
mGeckoView.setPivotY(0);
if (mGeckoView.getAlpha() < 1 || mGeckoView.getTranslationX() < 0) {
return;
}
@ -1575,6 +1614,7 @@ public class homeViewController {
scaleDown.start();
alpha.start();
mNewTabBlocker.bringToFront();
scaleDown.addListener(new Animator.AnimatorListener() {
@Override
@ -1606,17 +1646,15 @@ public class homeViewController {
}
public void onResetTabAnimation() {
mGeckoView.setPivotX(0);
mGeckoView.setPivotY(0);
ObjectAnimator scaleDown = ObjectAnimator.ofPropertyValuesHolder(mGeckoView, PropertyValuesHolder.ofFloat("translationX", 0, helperMethod.pxFromDp(0)));
scaleDown.setDuration(0);
scaleDown.setStartDelay(0);
mNewTabBlocker.animate().setStartDelay(250).setDuration(250).alpha(0f).withEndAction(() -> {
mNewTabBlocker.animate().setStartDelay(250).setDuration(150).alpha(0f).withEndAction(() -> {
mNewTabBlocker.setVisibility(View.GONE);
});
}
public void onResetTabAnimationInstant() {
mNewTabBlocker.animate().setStartDelay(250).setDuration(150).alpha(0f).withEndAction(() -> {
mNewTabBlocker.setVisibility(View.GONE);
});
scaleDown.start();
}
void onClearSelections(boolean hideKeyboard) {
@ -1644,6 +1682,8 @@ public class homeViewController {
private int mBannerHeight = 0;
private boolean mFullScreenBrowsingTemp = false;
void onFullScreenUpdate(boolean pStatus) {
int value = !pStatus ? 1 : 0;
@ -1680,7 +1720,7 @@ public class homeViewController {
mNestedScroll.setLayoutParams(params);
if (mProgressBar.getAlpha() > 0) {
onProgressBarUpdate(100, false);
onProgressBarUpdate(100, false, true);
}
this.mBlockerFullSceen.setVisibility(View.VISIBLE);
@ -1851,6 +1891,12 @@ public class homeViewController {
if (mEvent.invokeObserver(null, homeEnums.eHomeViewCallback.M_HOME_PAGE) == null) {
mEvent.invokeObserver(null, homeEnums.eHomeViewCallback.M_PRELOAD_URL);
if (status.sSettingRedirectStatus.equals(strings.GENERIC_EMPTY_STR)) {
new Handler().postDelayed(() ->
{
mProgressBar.setProgress(5);
mProgressBar.setAlpha(1);
mProgressBar.setVisibility(View.VISIBLE);
}, 100);
mEvent.invokeObserver(Collections.singletonList(helperMethod.getDomainName(status.sSettingDefaultSearchEngine)), homeEnums.eHomeViewCallback.ON_URL_LOAD);
} else {
mEvent.invokeObserver(Collections.singletonList(helperMethod.getDomainName(status.sSettingRedirectStatus)), homeEnums.eHomeViewCallback.ON_URL_LOAD);

View File

@ -109,7 +109,7 @@ public class orbotController extends AppCompatActivity {
}
public void initializeStartupAnimation() {
if (activityContextManager.getInstance().getHomeController().isSplashScreenLoading()) {
if (activityContextManager.getInstance().getHomeController()!=null && activityContextManager.getInstance().getHomeController().isSplashScreenLoading()) {
overridePendingTransition(R.anim.translate_fade_left_reverse, R.anim.translate_fade_right_reverse);
}
}

View File

@ -158,6 +158,7 @@ public class settingAccessibilityController extends AppCompatActivity {
if (mIsSettingChanged && mDefaultFontSize != status.sSettingFontSize) {
activityContextManager.getInstance().getHomeController().initRuntimeSettings();
activityContextManager.getInstance().getHomeController().onReload(null);
}
}

View File

@ -1,6 +1,6 @@
package com.hiddenservices.onionservices.appManager.settingManager.advanceManager;
import static com.hiddenservices.onionservices.pluginManager.pluginEnums.eMessageManager.M_IMAGE_UPDATE;
import static com.hiddenservices.onionservices.pluginManager.pluginEnums.eMessageManager.M_SETTING_CHANGED_RESTART_REQUSTED;
import android.content.res.Configuration;
import android.os.Bundle;
@ -160,7 +160,7 @@ public class settingAdvanceController extends AppCompatActivity {
public void onShowImages(View view) {
if (status.sShowImages == 0 && view.getId() == R.id.pAdvanceOption2 && !mImageOption.get(1).isChecked() || status.sShowImages == 2 && view.getId() == R.id.pAdvanceOption1 && !mImageOption.get(0).isChecked()) {
pluginController.getInstance().onMessageManagerInvoke(Collections.singletonList(this), M_IMAGE_UPDATE);
pluginController.getInstance().onMessageManagerInvoke(Collections.singletonList(this), M_SETTING_CHANGED_RESTART_REQUSTED);
}
mSettingAdvanceViewController.onTrigger(settingAdvanceEnums.eAdvanceViewController.M_CLEAR_IMAGE, Collections.singletonList(null));

View File

@ -35,9 +35,6 @@ public class proxyStatusController extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED);
if (!status.sSettingIsAppStarted) {
overridePendingTransition(R.anim.popup_scale_in, R.anim.popup_scale_out);
}
super.onCreate(savedInstanceState);
setContentView(R.layout.proxy_status_view);
@ -91,9 +88,6 @@ public class proxyStatusController extends AppCompatActivity {
public void onClose(View view) {
finish();
activityContextManager.getInstance().onRemoveStack(this);
if (!status.sSettingIsAppStarted) {
overridePendingTransition(R.anim.popup_scale_in, R.anim.popup_scale_out);
}
}
/* LOCAL OVERRIDES */

View File

@ -1,5 +1,7 @@
package com.hiddenservices.onionservices.appManager.settingManager.trackingManager;
import static com.hiddenservices.onionservices.pluginManager.pluginEnums.eMessageManager.M_SETTING_CHANGED_RESTART_REQUSTED;
import android.content.res.Configuration;
import android.os.Bundle;
import android.view.View;
@ -126,10 +128,14 @@ public class settingTrackingController extends AppCompatActivity {
}
public void onTracking(View view) {
int mTrackingProtectionCurrentStatus = status.sSettingTrackingProtection;
mSettingChanged = true;
mSettingPrivacyViewController.onTrigger(settingTrackingEnums.eTrackingViewController.M_SET_TRACKING_STATUS, Collections.singletonList(view));
mSettingPrivacyModel.onTrigger(settingTrackingEnums.eTrackingModel.M_SET_TRACKING_PROTECTION, Collections.singletonList(view));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_INT, Arrays.asList(keys.SETTING_TRACKING_PROTECTION, status.sSettingTrackingProtection));
if(mTrackingProtectionCurrentStatus != status.sSettingTrackingProtection){
pluginController.getInstance().onMessageManagerInvoke(Collections.singletonList(this), M_SETTING_CHANGED_RESTART_REQUSTED);
}
}
public void onOpenInfo(View view) {

View File

@ -0,0 +1,141 @@
package com.hiddenservices.onionservices.appManager.unproxiedConnectionManager;
import static android.webkit.WebSettings.LOAD_NO_CACHE;
import androidx.appcompat.app.AppCompatActivity;
import android.annotation.SuppressLint;
import android.content.ComponentCallbacks2;
import android.content.Context;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import android.view.View;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.hiddenservices.onionservices.R;
import com.hiddenservices.onionservices.appManager.activityContextManager;
import com.hiddenservices.onionservices.constants.enums;
import com.hiddenservices.onionservices.constants.status;
import com.hiddenservices.onionservices.dataManager.dataController;
import com.hiddenservices.onionservices.dataManager.dataEnums;
import com.hiddenservices.onionservices.eventObserver;
import com.hiddenservices.onionservices.pluginManager.pluginController;
import com.hiddenservices.onionservices.pluginManager.pluginEnums;
import org.torproject.android.service.wrapper.orbotLocalConstants;
import java.util.Collections;
import java.util.List;
import xcrash.ICrashCallback;
import xcrash.XCrash;
public class unproxiedConnectionController extends AppCompatActivity {
WebView mWebView;
ProgressBar mProgressBar;
unproxiedConnectionViewController mUnproxiedConnectionViewController;
TextView mHeader;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_adview_controller);
onCrashInit(this);
initializeViews();
onInitializeController();
onInitConnection();
}
private void initializeViews() {
mWebView = findViewById(R.id.pWebView);
mProgressBar = findViewById(R.id.mProgressBar);
mHeader = findViewById(R.id.pHeader);
mUnproxiedConnectionViewController = new unproxiedConnectionViewController(this, null, mProgressBar, mHeader);
}
@SuppressLint("SetJavaScriptEnabled")
void onInitConnection() {
mWebView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
mWebView.getSettings().setDomStorageEnabled(true);
mWebView.getSettings().setGeolocationEnabled(true);
mWebView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
mWebView.getSettings().setUseWideViewPort(true);
mWebView.getSettings().setDatabaseEnabled(true);
mWebView.getSettings().setLoadWithOverviewMode(true);
mWebView.getSettings().setUseWideViewPort(true);
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.getSettings().setCacheMode(LOAD_NO_CACHE);
mWebView.clearCache(true);
}
public void onCrashInit(Context mContext){
ICrashCallback callback = (logPath, emergency) -> {
finish();
};
XCrash.init(mContext, new XCrash.InitParameters()
.setAppVersion("1.2.3-beta456-patch789")
.setJavaRethrow(true)
.setJavaLogCountMax(10)
.setJavaDumpAllThreadsCountMax(10)
.setJavaCallback(callback)
.setNativeRethrow(true)
.setNativeLogCountMax(10)
.setNativeDumpAllThreads(true)
.setNativeDumpAllThreadsCountMax(10)
.setNativeCallback(callback)
.setAnrRethrow(true)
.setAnrLogCountMax(10)
.setAnrCallback(callback)
.setPlaceholderCountMax(3)
.setPlaceholderSizeKb(512)
.setLogFileMaintainDelayMs(1000));
}
private void onInitializeController() {
String mURL = getIntent().getExtras().getString("m_url");
if(getIntent().getExtras().containsKey("m_bridges")){
boolean mBridge = getIntent().getExtras().getBoolean("m_bridges");
if(mBridge){
mUnproxiedConnectionViewController.onTrigger(unproxiedConnectionEnums.eAdvertViewController.M_UPDATE_HEADER, Collections.singletonList("Request Bridge"));
}
}
System.gc();
if(mURL.contains("play.google.com")){
mWebView.setWebChromeClient(new WebChromeClient());
mWebView.loadUrl(mURL);
finish();
}else {
mWebView.setWebViewClient(new unproxiedConnectionWebViewClient(new webivewViewCallback()));
mWebView.loadUrl(mURL);
}
}
/* Helper Methods */
public void onClose(View view) {
finish();
}
/* Callbacks */
public class webivewViewCallback implements eventObserver.eventListener {
@Override
public Object invokeObserver(List<Object> data, Object event_type) {
if (event_type.equals(unproxiedConnectionEnums.eAdvertClientCallback.M_UPDATE_PROGRESSBAR)) {
mUnproxiedConnectionViewController.onTrigger(unproxiedConnectionEnums.eAdvertViewController.M_UPDATE_PROGRESSBAR, Collections.singletonList(data.get(0)));
}
return null;
}
}
}

View File

@ -0,0 +1,12 @@
package com.hiddenservices.onionservices.appManager.unproxiedConnectionManager;
class unproxiedConnectionEnums {
/*History Manager*/
public enum eAdvertClientCallback {
M_UPDATE_PROGRESSBAR
}
public enum eAdvertViewController {
M_UPDATE_PROGRESSBAR, M_UPDATE_HEADER
}
}

View File

@ -1,7 +1,9 @@
package com.hiddenservices.onionservices.appManager.advertManager;
package com.hiddenservices.onionservices.appManager.unproxiedConnectionManager;
import android.os.Bundle;
import android.widget.ProgressBar;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import com.hiddenservices.onionservices.R;
import com.hiddenservices.onionservices.eventObserver;
@ -9,10 +11,11 @@ import com.hiddenservices.onionservices.helperManager.sharedUIMethod;
import java.util.List;
public class advertViewController extends AppCompatActivity {
public class unproxiedConnectionViewController extends AppCompatActivity {
private AppCompatActivity mContext;
private ProgressBar mProgressBar;
private TextView mHeader;
@Override
protected void onCreate(Bundle savedInstanceState) {
@ -20,9 +23,10 @@ public class advertViewController extends AppCompatActivity {
setContentView(R.layout.activity_adview_controller);
}
advertViewController(AppCompatActivity pContext, eventObserver.eventListener pEvent, ProgressBar pProgressBar) {
unproxiedConnectionViewController(AppCompatActivity pContext, eventObserver.eventListener pEvent, ProgressBar pProgressBar, TextView p4Header) {
this.mContext = pContext;
this.mProgressBar = pProgressBar;
this.mHeader = p4Header;
initViews();
}
@ -39,13 +43,20 @@ public class advertViewController extends AppCompatActivity {
}
}
public void onTrigger(advertEnums.eAdvertViewController pCommands, List<Object> pData) {
if (pCommands.equals(advertEnums.eAdvertViewController.M_UPDATE_PROGRESSBAR)) {
public void onUpdateHeader(String pHeader) {
mHeader.setText(pHeader);
}
public void onTrigger(unproxiedConnectionEnums.eAdvertViewController pCommands, List<Object> pData) {
if (pCommands.equals(unproxiedConnectionEnums.eAdvertViewController.M_UPDATE_PROGRESSBAR)) {
onUpdateProgressBar((boolean) pData.get(0));
}
if (pCommands.equals(unproxiedConnectionEnums.eAdvertViewController.M_UPDATE_HEADER)) {
onUpdateHeader((String) pData.get(0));
}
}
public void onTrigger(advertEnums.eAdvertViewController pCommands) {
public void onTrigger(unproxiedConnectionEnums.eAdvertViewController pCommands) {
}
}

View File

@ -1,40 +1,40 @@
package com.hiddenservices.onionservices.appManager.advertManager;
import android.graphics.Bitmap;
import android.webkit.WebResourceError;
import android.webkit.WebResourceRequest;
import android.webkit.WebView;
import com.hiddenservices.onionservices.eventObserver;
import java.util.Collections;
public class advertWebViewClient extends android.webkit.WebViewClient {
private eventObserver.eventListener mEvent;
public advertWebViewClient(eventObserver.eventListener pEvent) {
mEvent = pEvent;
}
public boolean shouldOverrideUrlLoading(WebView view, String url){
view.loadUrl(url);
return true;
}
@Override
public void onPageStarted(WebView view, String url, Bitmap favicon) {
mEvent.invokeObserver(Collections.singletonList(true), advertEnums.eAdvertClientCallback.M_UPDATE_PROGRESSBAR);
}
@Override
public void onReceivedError(WebView view, WebResourceRequest request, WebResourceError error) {
mEvent.invokeObserver(Collections.singletonList(false), advertEnums.eAdvertClientCallback.M_UPDATE_PROGRESSBAR);
}
@Override
public void onPageFinished(WebView view, String url) {
mEvent.invokeObserver(Collections.singletonList(false), advertEnums.eAdvertClientCallback.M_UPDATE_PROGRESSBAR);
}
}
package com.hiddenservices.onionservices.appManager.unproxiedConnectionManager;
import android.graphics.Bitmap;
import android.webkit.WebResourceError;
import android.webkit.WebResourceRequest;
import android.webkit.WebView;
import com.hiddenservices.onionservices.eventObserver;
import java.util.Collections;
public class unproxiedConnectionWebViewClient extends android.webkit.WebViewClient {
private eventObserver.eventListener mEvent;
public unproxiedConnectionWebViewClient(eventObserver.eventListener pEvent) {
mEvent = pEvent;
}
public boolean shouldOverrideUrlLoading(WebView view, String url){
view.loadUrl(url);
return true;
}
@Override
public void onPageStarted(WebView view, String url, Bitmap favicon) {
mEvent.invokeObserver(Collections.singletonList(true), unproxiedConnectionEnums.eAdvertClientCallback.M_UPDATE_PROGRESSBAR);
}
@Override
public void onReceivedError(WebView view, WebResourceRequest request, WebResourceError error) {
mEvent.invokeObserver(Collections.singletonList(false), unproxiedConnectionEnums.eAdvertClientCallback.M_UPDATE_PROGRESSBAR);
}
@Override
public void onPageFinished(WebView view, String url) {
mEvent.invokeObserver(Collections.singletonList(false), unproxiedConnectionEnums.eAdvertClientCallback.M_UPDATE_PROGRESSBAR);
}
}

View File

@ -8,6 +8,8 @@ public class constants {
public static final String CONST_SAMSUNG_URL = "http://www.samsungapps.com/appquery/appDetail.as?appId=com.darkweb.genesissearchengine.production";
public static final String CONST_HUAWEI_URL = "https://appgallery.cloud.huawei.com/uowap/index.html#/detailApp/C106142211?appId=C106142211";
public static final String CONST_BRIDGES = "https://bridges.torproject.org/bridges/?transport=obfs4";
public static final String CONST_PRIVACY_POLICY_URL_NON_TOR = "resource://android/assets/policy/policy.html";
public static final String CONST_PRIVACY_POLICY_URL = "http://167.86.99.31/privacy";

View File

@ -20,18 +20,21 @@ public class strings {
public static final String BRIDGE_CUSTOM_BRIDGE_OBFS4 = "obfs4";
public static final String BRIDGE_CUSTOM_BRIDGE_SNOWFLAKES = "snowflake";
public static final String BRIDGE_CUSTOM_BRIDGE_MEEK = "meek";
public static final String BRIDGES_DEFAULT = "obfs4 78.215.187.186:45675 AE907EE5FAA5D0D27E0C83EFA6ADF8E79FCC0FF1 cert=/TRjMo+RinKaixARMjMtZZBhystaBe+aDaapPrbiITFtWx3M/AJcvpjHjO54tJqLd1+IWQ iat-mode=0\n" +
"obfs4 107.160.7.24:443 7A0904F6D182B81BEFE0DEDAFEC974494672627B cert=a5/IlZMnDvb8d92LTHMfsBIgL7QlDLPiXiLwe85uedC80mGD0QerygzmsWnMEdwG9ER9Eg iat-mode=0\n" +
"obfs4 79.136.160.201:46501 66AC975BF7CB429D057AE07FC0312C57D61BAEC1 cert=dCtn9Ya8z+R8YQikdWgC3XTAt58z5Apnm95QHrJwnhFSdnphPPEz+NMm6OawWc2srKLjJg iat-mode=0\n" +
"obfs4 94.242.249.2:58809 6AF3024788A7EA8F84E3FA3F60018B62291803E4 cert=X0sDCJLKMM/EISdGDEfGrsks41UYmScjIIXQ9AZgWFVKNKS6klcNEpdF4tNXFz6kIyk4Ug iat-mode=0\n" +
"obfs4 35.203.134.33:2224 15524C683CC872C8C8FB5B779A8D53F54F7ADCD4 cert=bXLTv0Kwt1zgPBoeVF86vC+0tYAHepR7+QMczhhTQw9hpAIhatt/Bpe6rSGY63Zh8aZ+dQ iat-mode=0\n" +
"obfs4 188.166.252.228:9443 595770328CA95E39FF5B81013880B46CA1B29546 cert=3PjhGUq3xWDMrBAzbV1eU4zPSB3GRGBpYdXQEs9hkrwC9RSZdnEe1P+cg7VgLgYTj/2MMg iat-mode=0\n" +
"obfs4 89.163.181.169:443 6A17D1E29E2807A1A4314215553079001031A7FF cert=e8JIYivx1zbYNOqq3a3+nDf/NDHoDQ/th/RVAnlVQePUIHxllG7aOku7pSwZisZ7i6ybVw iat-mode=0\n" +
"obfs4 94.242.249.2:40190 C7BE8154678E7537CCAC60B097D51A8A7EF8BCDF cert=8jw57wlMlVXCKsCnF7gCdApx7sRZLD5zPl8qdccwp0zltYG6kMYqBNm60dP8IxRH/l8OcQ iat-mode=0\n" +
"obfs4 77.81.104.251:443 115C90EBD0EB631C177560A872535772215478D9 cert=UsuF7oN4KNKviZP54JOyTCoCphrdM5gwZK4vT8GnCAcmqLUJEJxyw1dpko9a/ii6He4iZg iat-mode=0\n" +
"obfs4 5.249.146.133:80 FAF3A0073330D6AD92F3B4874B0D945562A633EF cert=TRe8bAODtjcGij7EPQaUayWEOqR99wDh2l3B4hFtCsn1JTJCph03pRZ9tx8wynpLYKWMQg iat-mode=0\n" +
"meek_lite 0.0.2.0:2 97700DFE9F483596DDA6264C4D7DF7641E1E39CE url=https://meek.azureedge.net/ front=ajax.aspnetcdn.com\n" +
"snowflake 192.0.2.3:1";
public static final String BRIDGES_DEFAULT = "obfs4 [2a0c:4d80:42:702::1]:27015 C5B7CD6946FF10C5B3E89691A7D3F2C122D2117C cert=TD7PbUO0/0k6xYHMPW3vJxICfkMZNdkRrb63Zhl5j9dW3iRGiCx0A7mPhe5T2EDzQ35+Zw iat-mode=0\n" +
"obfs4 85.31.186.98:443 011F2599C0E9B27EE74B353155E244813763C3E5 cert=ayq0XzCwhpdysn5o0EyDUbmSOx3X/oTEbzDMvczHOdBJKlvIdHHLJGkZARtT4dcBFArPPg iat-mode=0\n" +
"obfs4 38.229.1.78:80 C8CBDB2464FC9804A69531437BCF2BE31FDD2EE4 cert=Hmyfd2ev46gGY7NoVxA9ngrPF2zCZtzskRTzoWXbxNkzeVnGFPWmrTtILRyqCTjHR+s9dg iat-mode=1\n" +
"obfs4 146.57.248.225:22 10A6CD36A537FCE513A322361547444B393989F0 cert=K1gDtDAIcUfeLqbstggjIw2rtgIKqdIhUlHp82XRqNSq/mtAjp1BIC9vHKJ2FAEpGssTPw iat-mode=0\n" +
"obfs4 209.148.46.65:443 74FAD13168806246602538555B5521A0383A1875 cert=ssH+9rP8dG2NLDN2XuFw63hIO/9MNNinLmxQDpVa+7kTOa9/m+tGWT1SmSYpQ9uTBGa6Hw iat-mode=0\n" +
"obfs4 37.218.245.14:38224 D9A82D2F9C2F65A18407B1D2B764F130847F8B5D cert=bjRaMrr1BRiAW8IE9U5z27fQaYgOhX1UCmOpg2pFpoMvo6ZgQMzLsaTzzQNTlm7hNcb+Sg iat-mode=0\n" +
"obfs4 85.31.186.26:443 91A6354697E6B02A386312F68D82CF86824D3606 cert=PBwr+S8JTVZo6MPdHnkTwXJPILWADLqfMGoVvhZClMq/Urndyd42BwX9YFJHZnBB3H0XCw iat-mode=0\n" +
"obfs4 193.11.166.194:27020 86AC7B8D430DAC4117E9F42C9EAED18133863AAF cert=0LDeJH4JzMDtkJJrFphJCiPqKx7loozKN7VNfuukMGfHO0Z8OGdzHVkhVAOfo1mUdv9cMg iat-mode=0\n" +
"obfs4 38.229.33.83:80 0BAC39417268B96B9F514E7F63FA6FBA1A788955 cert=VwEFpk9F/UN9JED7XpG1XOjm/O8ZCXK80oPecgWnNDZDv5pdkhq1OpbAH0wNqOT6H6BmRQ iat-mode=1\n" +
"obfs4 192.95.36.142:443 CDF2E852BF539B82BD10E27E9115A31734E378C2 cert=qUVQ0srL1JI/vO6V6m/24anYXiJD3QP2HgzUKQtQ7GRqqUvs7P+tG43RtAqdhLOALP7DJQ iat-mode=1\n" +
"obfs4 51.222.13.177:80 5EDAC3B810E12B01F6FD8050D2FD3E277B289A08 cert=2uplIpLQ0q9+0qMFrK5pkaYRDOe460LL9WHBvatgkuRr/SL31wBOEupaMMJ6koRE6Ld0ew iat-mode=0\n" +
"obfs4 193.11.166.194:27025 1AE2C08904527FEA90C4C4F8C1083EA59FBC6FAF cert=ItvYZzW5tn6v3G4UnQa6Qz04Npro6e81AP70YujmK/KXwDFPTs3aHXcHp4n8Vt6w/bv8cA iat-mode=0\n" +
"obfs4 45.145.95.6:27015 C5B7CD6946FF10C5B3E89691A7D3F2C122D2117C cert=TD7PbUO0/0k6xYHMPW3vJxICfkMZNdkRrb63Zhl5j9dW3iRGiCx0A7mPhe5T2EDzQ35+Zw iat-mode=0\n" +
"obfs4 193.11.166.194:27015 2D82C2E354D531A68469ADF7F878FA6060C6BACA cert=4TLQPJrTSaDffMK7Nbao6LC7G9OW/NHkUwIdjLSS3KYf0Nv4/nQiiI8dY2TcsQx01NniOg iat-mode=0";
/*Generic*/
public static final String GENERIC_EMPTY_STR = "";

View File

@ -46,7 +46,7 @@ public class bridgesDataModel {
mBridges = response;
status.sBridgesDefault = response;
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_STRING, Arrays.asList(keys.BRIDGE_DEFAULT, mBridges));
String xx = status.sBridgesDefault = (String) dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_STRING, Arrays.asList(keys.BRIDGE_DEFAULT, strings.BRIDGES_DEFAULT));
status.sBridgesDefault = (String) dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_STRING, Arrays.asList(keys.BRIDGE_DEFAULT, strings.BRIDGES_DEFAULT));
mLoading = false;
} else {
mBridges = status.sReferenceWebsites;

View File

@ -84,7 +84,11 @@ class tabDataModel {
getCurrentTab().getSession().stop();
}
mTabs.add(mTabModel);
if(mTabModel.getSession().getCurrentURL().equals("about:blank")){
mTabs.add(0, mTabModel);
}else {
mTabs.add(mTabModel);
}
if (mTabs.size() > 20) {
closeTab(mTabs.get(mTabs.size() - 1).getSession());

View File

@ -13,6 +13,7 @@ import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.Color;
@ -92,6 +93,7 @@ import static com.hiddenservices.onionservices.constants.keys.M_ACTIVITY_NAVIGAT
import static com.hiddenservices.onionservices.constants.keys.M_RESTART_APP_KEY;
import static com.hiddenservices.onionservices.pluginManager.pluginEnums.eMessageManager.M_OPEN_ACTIVITY_FAILED;
import org.mozilla.geckoview.ContentBlocking;
import org.torproject.android.service.wrapper.orbotLocalConstants;
public class helperMethod {
@ -145,6 +147,7 @@ public class helperMethod {
mYAML = mYAML.replace("# network.proxy.socks: \"127.0.0.1\"", "network.proxy.socks: \"127.0.0.1\"");
mYAML = mYAML.replace("# network.proxy.socks_port: 9050", "network.proxy.socks_port: 9050");
mYAML = mYAML.replace("browser.cache.memory.enable: true", "browser.cache.memory.enable: false");
mYAML = mYAML.replace("privacy.resistFingerprinting: true", "privacy.resistFingerprinting: false");
StringBuilder buf = new StringBuilder(mYAML);
int portIndex = mYAML.indexOf("network.proxy.socks_port");
@ -153,6 +156,10 @@ public class helperMethod {
helperMethod.writeToFile(cacheFile.getPath(), mYAML);
} else {
mYAML = mYAML.replace("browser.cache.memory.enable: true", "browser.cache.memory.enable: false");
if(status.sSettingTrackingProtection == ContentBlocking.AntiTracking.STRICT){
mYAML = mYAML.replace("privacy.resistFingerprinting: false", "privacy.resistFingerprinting: true");
}
helperMethod.writeToFile(cacheFile.getPath(), mYAML);
}
@ -263,7 +270,7 @@ public class helperMethod {
}
public static String completeURL(String pURL) {
if (pURL.equals("about:blank") || pURL.equals("about:config") || pURL.startsWith("resource://")) {
if (pURL.equals("about:blank") || pURL.equals("about:config") || pURL.startsWith("resource://") || pURL.startsWith("data")) {
return pURL;
}
URL weburl;
@ -328,14 +335,17 @@ public class helperMethod {
public static SpannableString urlDesigner(boolean protocol, String url, Context pContext, int pDefColor, int pTheme, boolean sTorBrowsing) {
int mColor;
int mTextColor;
if (pTheme == enums.Theme.THEME_DARK) {
mColor = Color.argb(255, 0, 204, 71);
mTextColor = Color.WHITE;
} else {
mColor = Color.argb(255, 0, 153, 54);
mTextColor = Color.BLACK;
}
if(url.equals("about:blank")){
SpannableString span = new SpannableString(url);
span.setSpan(new ForegroundColorSpan(Color.BLACK), getHost(url).length()+7, url.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
span.setSpan(new ForegroundColorSpan(mTextColor), 0, url.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
return span;
}
@ -406,16 +416,12 @@ public class helperMethod {
context.startActivity(Intent.createChooser(emailIntent, "get transport obfs4"));
}
public static void sendBridgeEmail(Context context) {
Intent selectorIntent = new Intent(Intent.ACTION_SENDTO);
selectorIntent.setData(Uri.parse("mailto:"));
public static boolean getBridges(Context context) {
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://bridges.torproject.org/bridges/?transport=obfs4"));
context.startActivity(browserIntent);
return false;
final Intent emailIntent = new Intent(Intent.ACTION_SEND);
emailIntent.putExtra(Intent.EXTRA_EMAIL, new String[]{"bridges@torproject.org"});
emailIntent.putExtra(Intent.EXTRA_SUBJECT, "get transport obfs4");
emailIntent.putExtra(Intent.EXTRA_TEXT, "get transport obfs4");
emailIntent.setSelector(selectorIntent);
context.startActivity(Intent.createChooser(emailIntent, "get transport obfs4"));
}

View File

@ -307,7 +307,7 @@ public class messageManager implements View.OnClickListener, DialogInterface.OnD
mBridgeSettingCustomNext.setOnClickListener(this);
mDialog.setOnShowListener(dialog -> mContext.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_NOTHING));
if (!mCustomBridge.equals("meek") && !mCustomBridge.equals("obfs4")) {
if (!mCustomBridge.equals("meek") && !mCustomBridge.equals("snowflake") && !mCustomBridge.equals("obfs4")) {
mBridgeSettingCustomInput.setText(mCustomBridge);
mBridgeSettingBridgeType.setText(mBridgeType);
}
@ -350,7 +350,16 @@ public class messageManager implements View.OnClickListener, DialogInterface.OnD
SwitchMaterial mSecureTrackingProtectionStatus = mDialog.findViewById(R.id.pSecurePopupTrackingProtectionStatus);
pSecurePopupRootBlocker.animate().setStartDelay(100).setDuration(400).alpha(1);
pSecurePopupSubHeader.setText(helperMethod.getDomainName(mData.get(0).toString().replace("167.86.99.31", "orion.onion")));
String mURL = helperMethod.getDomainName(mData.get(0).toString().replace("167.86.99.31", "orion.onion").replace(CONST_GENESIS_URL_CACHED, "orion.onion").replace(CONST_GENESIS_URL_CACHED_DARK, "orion.onion"));
if(mURL.contains("?")){
mURL = mURL.substring(0, mURL.indexOf("?"));
}
if(status.sTorBrowsing){
//pSecurePopupHeader
((TextView)mDialog.findViewById(R.id.pSecurePopupHeader)).setText("Tor://");
mURL = mURL.replace("http://","onion://").replace("https://","onion://");
}
pSecurePopupSubHeader.setText(mURL);
mDialog.setOnDismissListener(this);
pSecurePopupRootBlocker.setOnClickListener(this);
@ -611,7 +620,7 @@ public class messageManager implements View.OnClickListener, DialogInterface.OnD
helperMethod.onDelayHandler(mContext, 200, () -> {
try {
onDismiss();
helperMethod.sendBridgeEmail(mContext);
mEvent.invokeObserver(null, M_GET_BRIDGES);
} catch (Exception ex) {
onTrigger(Arrays.asList(mContext, mContext.getString(R.string.ALERT_NOT_SUPPORTED_MESSAGE)), M_NOT_SUPPORTED);
}
@ -669,7 +678,7 @@ public class messageManager implements View.OnClickListener, DialogInterface.OnD
helperMethod.onDelayHandler(mContext, 200, () -> {
try {
onDismiss();
helperMethod.sendBridgeEmail(mContext);
helperMethod.getBridges(mContext);
} catch (Exception ex) {
onTrigger(Arrays.asList(mContext, mContext.getString(R.string.ALERT_NOT_SUPPORTED_MESSAGE)), M_NOT_SUPPORTED);
}
@ -901,14 +910,14 @@ public class messageManager implements View.OnClickListener, DialogInterface.OnD
onShowToast(R.layout.popup_toast_generic, R.xml.ax_background_generic, 2000, mContext.getString(R.string.TOAST_ALERT_BOOKMARK_UPDATE), mContext.getString(R.string.ALERT_DISMISS), null);
break;
case M_IMAGE_UPDATE:
case M_SETTING_CHANGED_RESTART_REQUSTED:
/*VERIFIED*/
onShowToast(R.layout.popup_toast_generic, R.xml.ax_background_generic, 4000, mContext.getString(R.string.TOAST_ALERT_IMAGE_STATUS), mContext.getString(R.string.TOAST_ALERT_RESTART), M_IMAGE_UPDATE_RESTART);
onShowToast(R.layout.popup_toast_generic, R.xml.ax_background_important, 4000, mContext.getString(R.string.TOAST_ALERT_IMAGE_STATUS), mContext.getString(R.string.TOAST_ALERT_RESTART), M_IMAGE_UPDATE_RESTART);
break;
case M_OPEN_CICADA:
/*VERIFIED*/
onShowToast(R.layout.popup_toast_generic, R.xml.ax_background_generic, 2000, mContext.getString(R.string.TOAST_ALERT_CICADA), mContext.getString(R.string.ALERT_DISMISS), null);
onShowToast(R.layout.popup_toast_generic, R.xml.ax_background_important, 2000, mContext.getString(R.string.TOAST_ALERT_CICADA), mContext.getString(R.string.ALERT_DISMISS), null);
break;
case M_TOR_SWITCH:

View File

@ -1,11 +1,13 @@
package com.hiddenservices.onionservices.pluginManager;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.view.WindowManager;
import android.widget.ImageView;
import androidx.appcompat.app.AppCompatActivity;
import com.hiddenservices.onionservices.appManager.activityContextManager;
import com.hiddenservices.onionservices.appManager.homeManager.geckoManager.geckoSession;
import com.hiddenservices.onionservices.appManager.unproxiedConnectionManager.unproxiedConnectionController;
import com.hiddenservices.onionservices.appManager.homeManager.homeController.homeController;
import com.hiddenservices.onionservices.appManager.orbotLogManager.orbotLogController;
import com.hiddenservices.onionservices.appManager.settingManager.privacyManager.settingPrivacyController;
@ -27,6 +29,8 @@ import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Locale;
import static com.hiddenservices.onionservices.constants.constants.CONST_BRIDGES;
import static com.hiddenservices.onionservices.pluginManager.pluginEnums.eAdManagerCallbacks.M_ON_AD_CLICKED;
import static com.hiddenservices.onionservices.pluginManager.pluginEnums.eAdManagerCallbacks.M_ON_AD_LOAD;
import static com.hiddenservices.onionservices.pluginManager.pluginEnums.eLangManager.M_ACTIVITY_CREATED;
@ -204,6 +208,15 @@ public class pluginController {
private class messageCallback implements eventObserver.eventListener {
@Override
public Object invokeObserver(List<Object> pData, Object pEventType) {
if (pEventType.equals(M_GET_BRIDGES)) {
Intent myIntent = new Intent(mContextManager.getBridgeController(), unproxiedConnectionController.class);
Bundle bundle = new Bundle();
bundle.putString("m_url", CONST_BRIDGES);
bundle.putBoolean("m_bridges", true);
myIntent.putExtras(bundle);
mContextManager.getBridgeController().startActivity(myIntent);
}
if (pEventType.equals(M_PANIC_RESET)) {
if(activityContextManager.getInstance().getSettingController()!=null){
activityContextManager.getInstance().getSettingController().moveTaskToBack(true);

View File

@ -27,11 +27,11 @@ public class pluginEnums {
/*Message Manager*/
public enum eMessageManager {
M_RESET, M_DATA_CLEARED, M_COPY, M_APPLICATION_CRASH, M_DELETE_BOOKMARK, M_UPDATE_BOOKMARK, M_IMAGE_UPDATE, M_OPEN_ACTIVITY_FAILED, M_OPEN_CICADA, M_TOR_SWITCH, M_SECURE_CONNECTION, M_SECURITY_INFO, M_POPUP_BLOCKED, M_PANIC, M_MAX_TAB_REACHED, M_LOW_MEMORY_AUTO, M_LOW_MEMORY, M_ORBOT_LOADING, M_GENESIS_SEARCH_DISABLED, M_LOAD_NEW_TAB, M_UNDO, M_DOWNLOAD_SINGLE, M_UPDATE_BRIDGES, M_NEW_IDENTITY, M_NOT_SUPPORTED, M_BRIDGE_MAIL, M_LONG_PRESS_WITH_LINK, M_LONG_PRESS_URL, M_LONG_PRESS_DOWNLOAD, M_START_ORBOT, M_DOWNLOAD_FAILURE, M_DOWNLOAD_FILE, M_RATE_APP, M_REPORT_URL, M_CLEAR_BOOKMARK, M_CLEAR_HISTORY, M_BOOKMARK, M_PANIC_RESET, M_DEFAULT_BROWSER, M_TOR_SWITCH_RESTART, M_RATE_SUCCESS, M_RATE_FAILURE, M_CLOSE, M_LANGUAGE_SUPPORT_FAILURE, M_WELCOME
M_RESET, M_DATA_CLEARED, M_COPY, M_APPLICATION_CRASH, M_DELETE_BOOKMARK, M_UPDATE_BOOKMARK, M_SETTING_CHANGED_RESTART_REQUSTED, M_OPEN_ACTIVITY_FAILED, M_OPEN_CICADA, M_TOR_SWITCH, M_SECURE_CONNECTION, M_SECURITY_INFO, M_POPUP_BLOCKED, M_PANIC, M_MAX_TAB_REACHED, M_LOW_MEMORY_AUTO, M_LOW_MEMORY, M_ORBOT_LOADING, M_GENESIS_SEARCH_DISABLED, M_LOAD_NEW_TAB, M_UNDO, M_DOWNLOAD_SINGLE, M_UPDATE_BRIDGES, M_NEW_IDENTITY, M_NOT_SUPPORTED, M_BRIDGE_MAIL, M_LONG_PRESS_WITH_LINK, M_LONG_PRESS_URL, M_LONG_PRESS_DOWNLOAD, M_START_ORBOT, M_DOWNLOAD_FAILURE, M_DOWNLOAD_FILE, M_RATE_APP, M_REPORT_URL, M_CLEAR_BOOKMARK, M_CLEAR_HISTORY, M_BOOKMARK, M_PANIC_RESET, M_DEFAULT_BROWSER, M_TOR_SWITCH_RESTART, M_RATE_SUCCESS, M_RATE_FAILURE, M_CLOSE, M_LANGUAGE_SUPPORT_FAILURE, M_WELCOME
}
public enum eMessageManagerCallbacks {
M_CANCEL_WELCOME, ON_FETCH_FAVICON, M_APP_RATED, M_DOWNLOAD_FILE_MANUAL, M_OPEN_LINK_CURRENT_TAB, M_COPY_LINK, M_REQUEST_BRIDGES, M_SET_BRIDGES, M_OPEN_LINK_NEW_TAB, M_CLEAR_TAB, M_RATE_APPLICATION, M_OPEN_PRIVACY, M_CLEAR_HISTORY, M_CLEAR_BOOKMARK, M_ADJUST_INPUT_RESIZE, M_OPEN_LOGS, M_LOAD_NEW_TAB, M_UNDO_TAB, M_CUSTOM_BRIDGE, M_BRIDGE_TYPE, M_DATA_CLEARED_EXTERNAL, M_IMAGE_UPDATE_RESTART
M_CANCEL_WELCOME, ON_FETCH_FAVICON, M_APP_RATED, M_DOWNLOAD_FILE_MANUAL, M_OPEN_LINK_CURRENT_TAB, M_COPY_LINK, M_REQUEST_BRIDGES, M_SET_BRIDGES, M_GET_BRIDGES, M_OPEN_LINK_NEW_TAB, M_CLEAR_TAB, M_RATE_APPLICATION, M_OPEN_PRIVACY, M_CLEAR_HISTORY, M_CLEAR_BOOKMARK, M_ADJUST_INPUT_RESIZE, M_OPEN_LOGS, M_LOAD_NEW_TAB, M_UNDO_TAB, M_CUSTOM_BRIDGE, M_BRIDGE_TYPE, M_DATA_CLEARED_EXTERNAL, M_IMAGE_UPDATE_RESTART
}
/*Download Manager*/

View File

@ -84,7 +84,7 @@
android:paddingEnd="10dp"
android:text="@string/ALERT_NON_SECURE_INFO_DETAIL"
android:textAlignment="textStart"
android:textColor="#546E7A"
android:textColor="@color/c_alert_background_description"
android:textSize="14sp"
android:translationZ="2dp"
app:layout_constraintEnd_toEndOf="parent"
@ -140,7 +140,7 @@
android:text="@string/ALERT_SECURE_INFO_JAVASCRIPT_INFO"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="#546E7A"
android:textColor="@color/c_alert_background_description"
android:textSize="12sp"
android:translationZ="2dp"
tools:ignore="RtlSymmetry,TextContrastCheck" />
@ -205,7 +205,7 @@
android:text="@string/ALERT_SECURE_INFO_NONTRACKING_INFO"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="#546E7A"
android:textColor="@color/c_alert_background_description"
android:textSize="12sp"
android:translationZ="2dp"
tools:ignore="RtlSymmetry,TextContrastCheck" />
@ -269,7 +269,7 @@
android:text="@string/ALERT_SECURE_INFO_TRACKING_INFO"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="#546E7A"
android:textColor="@color/c_alert_background_description"
android:textSize="12sp"
android:translationZ="2dp"
tools:ignore="RtlSymmetry,TextContrastCheck" />

View File

@ -47,7 +47,7 @@
android:paddingEnd="15dp"
android:text="@string/ALERT_CUSTOM_BRIDGES_INFO"
android:textAlignment="textStart"
android:textColor="#546E7A"
android:textColor="@color/c_alert_background_description"
android:textSize="13.5sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"

View File

@ -46,7 +46,7 @@
android:paddingEnd="15dp"
android:text="@string/ALERT_DEFAULT_BROWSER_DESCRIPTION"
android:textAlignment="viewStart"
android:textColor="#546E7A"
android:textColor="@color/c_alert_background_description"
android:textSize="15sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"

View File

@ -81,7 +81,7 @@
android:paddingEnd="10dp"
android:text="@string/ALERT_SECURE_INFO_DETAIL"
android:textAlignment="textStart"
android:textColor="#546E7A"
android:textColor="@color/c_alert_background_description"
android:textSize="14sp"
android:translationZ="2dp"
app:layout_constraintEnd_toEndOf="parent"
@ -137,7 +137,7 @@
android:text="@string/ALERT_SECURE_INFO_JAVASCRIPT_INFO"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="#546E7A"
android:textColor="@color/c_alert_background_description"
android:textSize="12sp"
android:translationZ="2dp"
tools:ignore="RtlSymmetry,TextContrastCheck" />
@ -202,7 +202,7 @@
android:text="@string/ALERT_SECURE_INFO_NONTRACKING_INFO"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="#546E7A"
android:textColor="@color/c_alert_background_description"
android:textSize="12sp"
android:translationZ="2dp"
tools:ignore="RtlSymmetry,TextContrastCheck" />
@ -266,7 +266,7 @@
android:text="@string/ALERT_SECURE_INFO_TRACKING_INFO"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="#546E7A"
android:textColor="@color/c_alert_background_description"
android:textSize="12sp"
android:translationZ="2dp"
tools:ignore="RtlSymmetry,TextContrastCheck" />

View File

@ -73,7 +73,7 @@
android:paddingBottom="100dp"
android:text="@string/GENERAL_TODO"
android:textAlignment="textStart"
android:textColor="#546E7A"
android:textColor="@color/c_alert_background_description"
android:textSize="13sp"
android:translationZ="2dp"
app:layout_constraintStart_toStartOf="parent"

View File

@ -46,7 +46,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginTop="12dp"
android:layout_marginTop="15dp"
android:paddingStart="5dp"
android:text="@string/ALERT_NON_SECURE_INFO"
android:textAlignment="textStart"
@ -62,7 +62,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="2dp"
android:layout_marginTop="12dp"
android:layout_marginTop="15dp"
android:alpha="0.8"
android:ellipsize="end"
android:layoutDirection="ltr"
@ -86,7 +86,7 @@
android:paddingEnd="10dp"
android:text="@string/ALERT_NON_SECURE_INFO_DETAIL"
android:textAlignment="textStart"
android:textColor="#546E7A"
android:textColor="@color/c_alert_background_description"
android:textSize="14sp"
android:translationZ="2dp"
app:layout_constraintEnd_toEndOf="parent"
@ -142,7 +142,7 @@
android:text="@string/ALERT_SECURE_INFO_JAVASCRIPT_INFO"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="#546E7A"
android:textColor="@color/c_alert_background_description"
android:textSize="12sp"
android:translationZ="2dp"
tools:ignore="RtlSymmetry,TextContrastCheck" />
@ -207,7 +207,7 @@
android:text="@string/ALERT_SECURE_INFO_NONTRACKING_INFO"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="#546E7A"
android:textColor="@color/c_alert_background_description"
android:textSize="12sp"
android:translationZ="2dp"
tools:ignore="RtlSymmetry,TextContrastCheck" />
@ -271,7 +271,7 @@
android:text="@string/ALERT_SECURE_INFO_TRACKING_INFO"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="#546E7A"
android:textColor="@color/c_alert_background_description"
android:textSize="12sp"
android:translationZ="2dp"
tools:ignore="RtlSymmetry,TextContrastCheck" />

View File

@ -48,7 +48,7 @@
android:paddingEnd="15dp"
android:text="@string/ALERT_CUSTOM_BRIDGES_INFO"
android:textAlignment="textStart"
android:textColor="#546E7A"
android:textColor="@color/c_alert_background_description"
android:textSize="13.5sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"

View File

@ -48,7 +48,7 @@
android:paddingEnd="15dp"
android:text="@string/ALERT_DEFAULT_BROWSER_DESCRIPTION"
android:textAlignment="viewStart"
android:textColor="#546E7A"
android:textColor="@color/c_alert_background_description"
android:textSize="15sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"

View File

@ -124,7 +124,7 @@
android:text="@string/ALERT_DOWNLOAD_OPTION_1"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="#546E7A"
android:textColor="@color/c_alert_background_description"
android:textSize="14sp"
tools:ignore="TextContrastCheck" />
@ -175,7 +175,7 @@
android:text="@string/ALERT_DOWNLOAD_OPTION_2"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="#546E7A"
android:textColor="@color/c_alert_background_description"
android:textSize="14sp"
tools:ignore="TextContrastCheck" />
@ -226,7 +226,7 @@
android:text="@string/ALERT_DOWNLOAD_OPTION_3"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="#546E7A"
android:textColor="@color/c_alert_background_description"
android:textSize="14sp"
tools:ignore="TextContrastCheck" />
@ -280,7 +280,7 @@
android:text="@string/ALERT_DOWNLOAD_OPTION_4"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="#546E7A"
android:textColor="@color/c_alert_background_description"
android:textSize="14sp"
tools:ignore="TextContrastCheck" />
@ -334,7 +334,7 @@
android:text="@string/ALERT_DOWNLOAD_OPTION_5"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="#546E7A"
android:textColor="@color/c_alert_background_description"
android:textSize="14sp"
tools:ignore="TextContrastCheck" />
@ -388,7 +388,7 @@
android:text="@string/ALERT_DOWNLOAD_OPTION_6"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="#546E7A"
android:textColor="@color/c_alert_background_description"
android:textSize="14sp"
tools:ignore="TextContrastCheck" />
@ -443,7 +443,7 @@
android:text="@string/ALERT_DOWNLOAD_OPTION_7"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="#616161"
android:textColor="@color/c_alert_background_description"
android:textSize="14sp"
tools:ignore="TextContrastCheck" />

View File

@ -105,7 +105,7 @@
android:text="@string/ALERT_LONG_URL_OPTION_4"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="#546E7A"
android:textColor="@color/c_alert_background_description"
android:textSize="14sp"
tools:ignore="TextContrastCheck" />
@ -157,7 +157,7 @@
android:text="@string/ALERT_LONG_URL_OPTION_1"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="#546E7A"
android:textColor="@color/c_alert_background_description"
android:textSize="14sp"
tools:ignore="TextContrastCheck" />
@ -208,7 +208,7 @@
android:text="@string/ALERT_LONG_URL_OPTION_2"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="#546E7A"
android:textColor="@color/c_alert_background_description"
android:textSize="14sp"
tools:ignore="TextContrastCheck" />
@ -259,7 +259,7 @@
android:text="@string/ALERT_LONG_URL_OPTION_3"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="#546E7A"
android:textColor="@color/c_alert_background_description"
android:textSize="14sp"
tools:ignore="TextContrastCheck" />

View File

@ -103,7 +103,7 @@
android:text="@string/ALERT_LONG_URL_OPTION_1"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="#546E7A"
android:textColor="@color/c_alert_background_description"
android:textSize="14sp"
tools:ignore="TextContrastCheck" />
@ -154,7 +154,7 @@
android:text="@string/ALERT_LONG_URL_OPTION_2"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="#546E7A"
android:textColor="@color/c_alert_background_description"
android:textSize="14sp"
tools:ignore="TextContrastCheck" />
@ -205,7 +205,7 @@
android:text="@string/ALERT_LONG_URL_OPTION_3"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="#546E7A"
android:textColor="@color/c_alert_background_description"
android:textSize="14sp"
tools:ignore="TextContrastCheck" />

View File

@ -86,7 +86,7 @@
android:paddingEnd="10dp"
android:text="@string/ALERT_SECURE_INFO_DETAIL"
android:textAlignment="textStart"
android:textColor="#546E7A"
android:textColor="@color/c_alert_background_description"
android:textSize="14sp"
android:translationZ="2dp"
app:layout_constraintEnd_toEndOf="parent"
@ -142,7 +142,7 @@
android:text="@string/ALERT_SECURE_INFO_JAVASCRIPT_INFO"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="#546E7A"
android:textColor="@color/c_alert_background_description"
android:textSize="12sp"
android:translationZ="2dp"
tools:ignore="RtlSymmetry,TextContrastCheck" />
@ -207,7 +207,7 @@
android:text="@string/ALERT_SECURE_INFO_NONTRACKING_INFO"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="#546E7A"
android:textColor="@color/c_alert_background_description"
android:textSize="12sp"
android:translationZ="2dp"
tools:ignore="RtlSymmetry,TextContrastCheck" />
@ -271,7 +271,7 @@
android:text="@string/ALERT_SECURE_INFO_TRACKING_INFO"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="#546E7A"
android:textColor="@color/c_alert_background_description"
android:textSize="12sp"
android:translationZ="2dp"
tools:ignore="RtlSymmetry,TextContrastCheck" />

View File

@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.hiddenservices.onionservices.appManager.advertManager.advertController">
tools:context="com.hiddenservices.onionservices.appManager.unproxiedConnectionManager.unproxiedConnectionController">
<LinearLayout
android:id="@+id/pHeaderContainerTop"
@ -35,6 +35,7 @@
tools:ignore="TouchTargetSizeCheck" />
<TextView
android:id="@+id/pHeader"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:paddingTop="1dp"

View File

@ -5,7 +5,7 @@
android:id="@+id/pSecureRoot"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/button_gray_alpha"
android:background="@color/c_white"
tools:context="com.hiddenservices.onionservices.appManager.homeManager.homeController.homeController">
<View
@ -25,7 +25,7 @@
android:id="@+id/pCoordinatorLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/c_background_keyboard"
android:background="@color/c_white"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/adView">
@ -35,7 +35,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layoutDirection="ltr"
android:background="@color/c_background"
android:background="@color/c_white"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
android:translationZ="3dp"
app:layout_scrollFlags="enterAlwaysCollapsed">
@ -53,7 +53,7 @@
android:id="@+id/pTopLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/c_background"
android:background="@color/c_white"
android:clipToPadding="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@ -928,6 +928,7 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/adView"
app:layout_constraintVertical_weight="1" />
app:layout_constraintVertical_weight="1"
tools:layout="@layout/tab_view" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -235,7 +235,7 @@
android:clickable="false"
android:padding="0dp"
android:paddingStart="15dp"
android:text="@string/SETTING_SEARCH_NAME_DUCKDUCKGO"
android:text="@string/SETTING_SEARCH_DUCK"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="@color/c_text_v1"
@ -251,7 +251,7 @@
android:clickable="false"
android:padding="0dp"
android:paddingStart="15dp"
android:text="@string/SETTING_SEARCH_DUCK"
android:text="@string/SETTING_SEARCH_NAME_DUCKDUCKGO"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="#757575"
@ -314,7 +314,7 @@
android:clickable="false"
android:padding="0dp"
android:paddingStart="15dp"
android:text="@string/SETTING_SEARCH_NAME_GOOGLE"
android:text="@string/SETTING_SEARCH_GOOGLE"
android:textDirection="locale"
android:textAlignment="viewStart"
android:textAllCaps="false"
@ -331,7 +331,7 @@
android:clickable="false"
android:padding="0dp"
android:paddingStart="15dp"
android:text="@string/SETTING_SEARCH_GOOGLE"
android:text="@string/SETTING_SEARCH_NAME_GOOGLE"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="#757575"
@ -394,7 +394,7 @@
android:clickable="false"
android:padding="0dp"
android:paddingStart="15dp"
android:text="@string/SETTING_SEARCH_NAME_BING"
android:text="@string/SETTING_SEARCH_AMAZON"
android:textDirection="locale"
android:textAlignment="viewStart"
android:textAllCaps="false"
@ -411,7 +411,7 @@
android:clickable="false"
android:padding="0dp"
android:paddingStart="15dp"
android:text="@string/SETTING_SEARCH_AMAZON"
android:text="@string/SETTING_SEARCH_NAME_BING"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="#757575"
@ -474,7 +474,7 @@
android:clickable="false"
android:padding="0dp"
android:paddingStart="15dp"
android:text="@string/SETTING_SEARCH_NAME_WIKIPEDIA"
android:text="@string/SETTING_SEARCH_NAME_WIKIPEDIA_Name"
android:textDirection="locale"
android:textAlignment="viewStart"
android:textAllCaps="false"
@ -491,7 +491,7 @@
android:clickable="false"
android:padding="0dp"
android:paddingStart="15dp"
android:text="@string/SETTING_SEARCH_BING"
android:text="@string/SETTING_SEARCH_NAME_WIKIPEDIA"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="#757575"

View File

@ -129,8 +129,8 @@
android:visibility="visible" />
<androidx.cardview.widget.CardView
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_width="23dp"
android:layout_height="23dp"
app:cardElevation="0dp"
android:layout_marginTop="4dp"
android:layout_marginStart="4dp"
@ -141,8 +141,8 @@
<ImageView
android:alpha="0.9"
android:id="@+id/pLogo"
android:layout_width="23dp"
android:layout_height="23dp"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@string/GENERAL_TODO"
android:textAlignment="center"
android:background="@xml/ic_baseline_browser"

View File

@ -1,5 +1,14 @@
obfs4 185.220.101.165:12346 B3E9AA2080C976E18EDD6AD06A317001172BF3C2 cert=p9L6+25s8bnfkye1ZxFeAE4mAGY7DH4Gaj7dxngIIzP9BtqrHHwZXdjMK0RVIQ34C7aqZw iat-mode=2
obfs4 69.51.20.56:443 7F4EA8DFB5555304763FBF62BDFF29B8F73BF5F7 cert=ppU2EsiAw76IG7MU7h2KtxiqXDuaxglQkfWTC5I3xElskhnlvmW30Gqd3Wi3x2rCCb/TGA iat-mode=0
obfs4 185.162.248.147:10111 7207F204CC4E242688FFA252599E51DDA776C01D cert=e3LSXtFXpmAP5pcW2UgSMwi4QaOeRiFxzXj6v9FXpD8yjjZhtcO2PDwBx+vdx4Wb5W3yTw iat-mode=0
meek_lite 0.0.2.0:2 97700DFE9F483596DDA6264C4D7DF7641E1E39CE url=https://meek.azureedge.net/ front=ajax.aspnetcdn.com
snowflake 192.0.2.3:1
obfs4 [2a0c:4d80:42:702::1]:27015 C5B7CD6946FF10C5B3E89691A7D3F2C122D2117C cert=TD7PbUO0/0k6xYHMPW3vJxICfkMZNdkRrb63Zhl5j9dW3iRGiCx0A7mPhe5T2EDzQ35+Zw iat-mode=0
obfs4 85.31.186.98:443 011F2599C0E9B27EE74B353155E244813763C3E5 cert=ayq0XzCwhpdysn5o0EyDUbmSOx3X/oTEbzDMvczHOdBJKlvIdHHLJGkZARtT4dcBFArPPg iat-mode=0
obfs4 38.229.1.78:80 C8CBDB2464FC9804A69531437BCF2BE31FDD2EE4 cert=Hmyfd2ev46gGY7NoVxA9ngrPF2zCZtzskRTzoWXbxNkzeVnGFPWmrTtILRyqCTjHR+s9dg iat-mode=1
obfs4 146.57.248.225:22 10A6CD36A537FCE513A322361547444B393989F0 cert=K1gDtDAIcUfeLqbstggjIw2rtgIKqdIhUlHp82XRqNSq/mtAjp1BIC9vHKJ2FAEpGssTPw iat-mode=0
obfs4 209.148.46.65:443 74FAD13168806246602538555B5521A0383A1875 cert=ssH+9rP8dG2NLDN2XuFw63hIO/9MNNinLmxQDpVa+7kTOa9/m+tGWT1SmSYpQ9uTBGa6Hw iat-mode=0
obfs4 37.218.245.14:38224 D9A82D2F9C2F65A18407B1D2B764F130847F8B5D cert=bjRaMrr1BRiAW8IE9U5z27fQaYgOhX1UCmOpg2pFpoMvo6ZgQMzLsaTzzQNTlm7hNcb+Sg iat-mode=0
obfs4 85.31.186.26:443 91A6354697E6B02A386312F68D82CF86824D3606 cert=PBwr+S8JTVZo6MPdHnkTwXJPILWADLqfMGoVvhZClMq/Urndyd42BwX9YFJHZnBB3H0XCw iat-mode=0
obfs4 193.11.166.194:27020 86AC7B8D430DAC4117E9F42C9EAED18133863AAF cert=0LDeJH4JzMDtkJJrFphJCiPqKx7loozKN7VNfuukMGfHO0Z8OGdzHVkhVAOfo1mUdv9cMg iat-mode=0
obfs4 38.229.33.83:80 0BAC39417268B96B9F514E7F63FA6FBA1A788955 cert=VwEFpk9F/UN9JED7XpG1XOjm/O8ZCXK80oPecgWnNDZDv5pdkhq1OpbAH0wNqOT6H6BmRQ iat-mode=1
obfs4 192.95.36.142:443 CDF2E852BF539B82BD10E27E9115A31734E378C2 cert=qUVQ0srL1JI/vO6V6m/24anYXiJD3QP2HgzUKQtQ7GRqqUvs7P+tG43RtAqdhLOALP7DJQ iat-mode=1
obfs4 51.222.13.177:80 5EDAC3B810E12B01F6FD8050D2FD3E277B289A08 cert=2uplIpLQ0q9+0qMFrK5pkaYRDOe460LL9WHBvatgkuRr/SL31wBOEupaMMJ6koRE6Ld0ew iat-mode=0
obfs4 193.11.166.194:27025 1AE2C08904527FEA90C4C4F8C1083EA59FBC6FAF cert=ItvYZzW5tn6v3G4UnQa6Qz04Npro6e81AP70YujmK/KXwDFPTs3aHXcHp4n8Vt6w/bv8cA iat-mode=0
obfs4 45.145.95.6:27015 C5B7CD6946FF10C5B3E89691A7D3F2C122D2117C cert=TD7PbUO0/0k6xYHMPW3vJxICfkMZNdkRrb63Zhl5j9dW3iRGiCx0A7mPhe5T2EDzQ35+Zw iat-mode=0
obfs4 193.11.166.194:27015 2D82C2E354D531A68469ADF7F878FA6060C6BACA cert=4TLQPJrTSaDffMK7Nbao6LC7G9OW/NHkUwIdjLSS3KYf0Nv4/nQiiI8dY2TcsQx01NniOg iat-mode=0

View File

@ -1,5 +1,18 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Internal -->
<string name="before_unload_title" translatable="false">Are you sure?</string>
<string name="before_unload_leave_page" translatable="false">Leave Page</string>
<string name="before_unload_stay" translatable="false">Stay on Page</string>
<string name="clear_field" translatable="false">Clear</string>
<string name="username" translatable="false">Username</string>
<string name="password" translatable="false">Password</string>
<string name="repost_confirm_message" translatable="false">To display this page, GeckoViewExample must send information that will repeat any action (such as a search or order confirmation) that was performed earlier.</string>
<string name="repost_confirm_title" translatable="false">Are you sure?</string>
<string name="repost_confirm_resend" translatable="false">Resend</string>
<string name="repost_confirm_cancel" translatable="false">Cancel</string>
<!-- Application Strings -->
<string name="mode" translatable="false">Day</string>
<string name="app_name" translatable="false">Orion Browser</string>
@ -216,6 +229,7 @@
<!-- Settings -->
<string name="SETTING_SEARCH_NAME_WIKIPEDIA_Name" translatable="false">Wikipedia</string>
<string name="SETTING_SEARCH_NAME_WIKIPEDIA" translatable="true">Browse articles freely</string>
<string name="SETTING_SEARCH_NAME_BING" translatable="true">Search from microsoft</string>
<string name="SETTING_SEARCH_NAME_GOOGLE" translatable="true">Search from google</string>

View File

@ -255,12 +255,6 @@ public class OrbotService extends VpnService implements OrbotConstants {
return;
}
Log.i("FFFFFFFFFFFFFFF","111");
Log.i("FFFFFFFFFFFFFFF","111");
Log.i("FFFFFFFFFFFFFFF","111");
Log.i("FFFFFFFFFFFFFFF","111");
Log.i("FFFFFFFFFFFFFFF","111");
var intent = getPackageManager().getLaunchIntentForPackage(getPackageName());
var pendIntent = PendingIntent.getActivity(OrbotService.this, 0, intent, PendingIntent.FLAG_IMMUTABLE);
@ -274,8 +268,8 @@ public class OrbotService extends VpnService implements OrbotConstants {
mNotifyBuilder.setOngoing(true);
var title = getString(R.string.status_disabled);
if (mCurrentStatus.equals(STATUS_STARTING) || notifyMsg.equals(getString(R.string.status_starting_up)))
var title = getString(R.string.status_starting_up);
if (STATUS_STARTING==null || mCurrentStatus.equals(STATUS_STARTING) || notifyMsg.equals(getString(R.string.status_starting_up)))
title = getString(R.string.status_starting_up);
else if (mCurrentStatus.equals(STATUS_ON)) {
title = getString(R.string.status_activated);
@ -450,7 +444,7 @@ public class OrbotService extends VpnService implements OrbotConstants {
var capacity = 1;
var keepLocalAddresses = false;
var unsafeLogging = false;
var stunUrl = "stun:stun.stunprotocol.org:3478";
var stunUrl = "stun:stun.l.google.com:19302";
var relayUrl = "wss://snowflake.bamsoftware.com";
var natProbeUrl = "https://snowflake-broker.torproject.net:8443/probe";
var brokerUrl = "https://snowflake-broker.torproject.net/";
@ -459,7 +453,7 @@ public class OrbotService extends VpnService implements OrbotConstants {
Prefs.addSnowflakeServed();
if (!Prefs.showSnowflakeProxyMessage()) return;
var message = String.format(getString(R.string.snowflake_proxy_client_connected_msg), SNOWFLAKE_EMOJI, SNOWFLAKE_EMOJI);
new Handler(getMainLooper()).post(() -> Toast.makeText(this, message, Toast.LENGTH_LONG).show());
new Handler(getMainLooper()).post(() -> Toast.makeText(getApplicationContext(), message, Toast.LENGTH_LONG).show());
});
logNotice(getString(R.string.log_notice_snowflake_proxy_enabled));
}
@ -622,6 +616,11 @@ public class OrbotService extends VpnService implements OrbotConstants {
}
}
private static boolean useIPtObfsMeekProxy() {
var bridgeList = Prefs.getBridgesList();
return bridgeList.contains("obfs") || bridgeList.contains("meek");
}
private File updateTorrcCustomFile() throws IOException {
var prefs = Prefs.getSharedPrefs(this);
var extraLines = new StringBuffer();
@ -857,6 +856,14 @@ public class OrbotService extends VpnService implements OrbotConstants {
Prefs.putPrefSmartTrySnowflake(false);
}
public void setSnowflakesProxy(){
}
public void setObfs4Proxy(){
}
private void sendSmartStatusToActivity(String status) {
var intent = new Intent(LOCAL_ACTION_SMART_CONNECT_EVENT)
.putExtra(LOCAL_EXTRA_SMART_STATUS, status);
@ -1552,6 +1559,22 @@ public class OrbotService extends VpnService implements OrbotConstants {
}
private static boolean useIPtSnowflakeProxyDomainFronting() {
return Prefs.getBridgesList().equals("snowflake");
}
private static boolean useIPtSnowflakeProxyAMPRendezvous() {
return Prefs.getBridgesList().equals("snowfla_ke");
}
private void startSnowflakeClientAmpRendezvous() {
var stunServers = "stun:stun.l.google.com:19302,stun:stun.antisip.com:3478,stun:stun.bluesip.net:3478,stun:stun.dus.net:3478,stun:stun.epygi.com:3478,stun:stun.sonetel.com:3478,stun:stun.uls.co.za:3478,stun:stun.voipgate.com:3478,stun:stun.voys.nl:3478";
var target = "https://snowflake-broker.torproject.net/";
var front = "www.google.com";
var ampCache ="https://cdn.ampproject.org/";
IPtProxy.startSnowflake(stunServers, target, front, ampCache, null, true, false, false, 1);
}
private class IncomingIntentRouter implements Runnable {
final Intent mIntent;
@ -1565,12 +1588,17 @@ public class OrbotService extends VpnService implements OrbotConstants {
if (TextUtils.isEmpty(action)) return;
switch (action) {
case ACTION_START:
var connectionPathway = Prefs.getConnectionPathway();
if (connectionPathway.equals(Prefs.PATHWAY_SNOWFLAKE) || Prefs.getPrefSmartTrySnowflake()) {
startSnowflakeClientDomainFronting();
} else if (connectionPathway.equals(Prefs.PATHWAY_CUSTOM) || Prefs.getPrefSmartTryObfs4() != null) {
IPtProxy.startObfs4Proxy("DEBUG", false, false, null);
if (Prefs.bridgesEnabled()) {
if (useIPtObfsMeekProxy())
IPtProxy.startObfs4Proxy("DEBUG", false, false, null);
else if (useIPtSnowflakeProxyDomainFronting())
startSnowflakeClientAmpRendezvous();
else if (useIPtSnowflakeProxyAMPRendezvous())
startSnowflakeClientAmpRendezvous();
} else if (Prefs.beSnowflakeProxy()) {
enableSnowflakeProxy();
}
startTor();
replyWithStatus(mIntent);

View File

@ -45,14 +45,60 @@ public class Prefs {
private static SharedPreferences prefs;
private static boolean meek_status = false;
public static void setContext(Context context) {
if (prefs == null) {
prefs = getSharedPrefs(context);
putBridgesEnabled(orbotLocalConstants.mBridgesInitStatus);
putBridgesEnabled(orbotLocalConstants.mInitUpdateBridge);
setBridgesList(orbotLocalConstants.mInitUpdateBridgeList);
putUseVpn(orbotLocalConstants.mInitUpdateVPN);
}
if(orbotLocalConstants.mBridgesInitStatus){
putBridgesEnabled(true);
switch (orbotLocalConstants.mBridges) {
case "obfs4":
meek_status = false;
putPrefSmartTrySnowflake(false);
setBeSnowflakeProxy(false);
putBridgesEnabled(true);
setBridgesList(orbotLocalConstants.mBridgesDefault);
putPrefSmartTryObfs4(orbotLocalConstants.mBridgesDefault);
putString(PREF_CONNECTION_PATHWAY, PATHWAY_CUSTOM);
break;
case "meek":
meek_status = true;
putPrefSmartTrySnowflake(false);
setBeSnowflakeProxy(false);
putBridgesEnabled(true);
setBridgesList(orbotLocalConstants.mMeek);
putPrefSmartTryObfs4(orbotLocalConstants.mMeek);
putString(PREF_CONNECTION_PATHWAY, PATHWAY_CUSTOM);
break;
case "snowflake":
meek_status = false;
setBeSnowflakeProxy(true);
putPrefSmartTrySnowflake(true);
putBridgesEnabled(true);
putString(PREF_CONNECTION_PATHWAY, PATHWAY_SNOWFLAKE);
break;
default:
meek_status = false;
putPrefSmartTrySnowflake(false);
setBeSnowflakeProxy(false);
putBridgesEnabled(true);
putString(PREF_CONNECTION_PATHWAY, PATHWAY_CUSTOM);
setBridgesList(orbotLocalConstants.mBridges);
putPrefSmartTryObfs4(orbotLocalConstants.mBridgesDefault);
break;
}
}else{
putBridgesEnabled(false);
meek_status = false;
setBridgesList(orbotLocalConstants.mBridgesDefault);
setBeSnowflakeProxy(false);
putPrefSmartTrySnowflake(false);
putBridgesEnabled(false);
putPrefSmartTryObfs4(orbotLocalConstants.mBridgesDefault);
putString(PREF_CONNECTION_PATHWAY, PATHWAY_SMART);
}
}
@ -97,8 +143,11 @@ public class Prefs {
public static String getBridgesList() {
String defaultBridgeType = "obfs4";
if (Locale.getDefault().getLanguage().equals("fa"))
if (Locale.getDefault().getLanguage().equals("fa") || meek_status)
defaultBridgeType = "meek"; //if Farsi, use meek as the default bridge type
if(orbotLocalConstants.mBridges.equals("snowflake")){
return orbotLocalConstants.mBridges;
}
return prefs.getString(PREF_BRIDGES_LIST, defaultBridgeType);
}

View File

@ -34,4 +34,19 @@ public class orbotLocalConstants
public static int mHTTPPort = 8118;
public static int mSOCKSPort = -1;
public static String mMeek = "obfs4 85.31.186.98:443 011F2599C0E9B27EE74B353155E244813763C3E5 cert=ayq0XzCwhpdysn5o0EyDUbmSOx3X/oTEbzDMvczHOdBJKlvIdHHLJGkZARtT4dcBFArPPg iat-mode=0\n" +
"obfs4 38.229.1.78:80 C8CBDB2464FC9804A69531437BCF2BE31FDD2EE4 cert=Hmyfd2ev46gGY7NoVxA9ngrPF2zCZtzskRTzoWXbxNkzeVnGFPWmrTtILRyqCTjHR+s9dg iat-mode=1\n" +
"obfs4 146.57.248.225:22 10A6CD36A537FCE513A322361547444B393989F0 cert=K1gDtDAIcUfeLqbstggjIw2rtgIKqdIhUlHp82XRqNSq/mtAjp1BIC9vHKJ2FAEpGssTPw iat-mode=0\n" +
"obfs4 209.148.46.65:443 74FAD13168806246602538555B5521A0383A1875 cert=ssH+9rP8dG2NLDN2XuFw63hIO/9MNNinLmxQDpVa+7kTOa9/m+tGWT1SmSYpQ9uTBGa6Hw iat-mode=0\n" +
"obfs4 37.218.245.14:38224 D9A82D2F9C2F65A18407B1D2B764F130847F8B5D cert=bjRaMrr1BRiAW8IE9U5z27fQaYgOhX1UCmOpg2pFpoMvo6ZgQMzLsaTzzQNTlm7hNcb+Sg iat-mode=0\n" +
"obfs4 85.31.186.26:443 91A6354697E6B02A386312F68D82CF86824D3606 cert=PBwr+S8JTVZo6MPdHnkTwXJPILWADLqfMGoVvhZClMq/Urndyd42BwX9YFJHZnBB3H0XCw iat-mode=0\n" +
"obfs4 193.11.166.194:27020 86AC7B8D430DAC4117E9F42C9EAED18133863AAF cert=0LDeJH4JzMDtkJJrFphJCiPqKx7loozKN7VNfuukMGfHO0Z8OGdzHVkhVAOfo1mUdv9cMg iat-mode=0\n" +
"obfs4 38.229.33.83:80 0BAC39417268B96B9F514E7F63FA6FBA1A788955 cert=VwEFpk9F/UN9JED7XpG1XOjm/O8ZCXK80oPecgWnNDZDv5pdkhq1OpbAH0wNqOT6H6BmRQ iat-mode=1\n" +
"obfs4 192.95.36.142:443 CDF2E852BF539B82BD10E27E9115A31734E378C2 cert=qUVQ0srL1JI/vO6V6m/24anYXiJD3QP2HgzUKQtQ7GRqqUvs7P+tG43RtAqdhLOALP7DJQ iat-mode=1\n" +
"obfs4 51.222.13.177:80 5EDAC3B810E12B01F6FD8050D2FD3E277B289A08 cert=2uplIpLQ0q9+0qMFrK5pkaYRDOe460LL9WHBvatgkuRr/SL31wBOEupaMMJ6koRE6Ld0ew iat-mode=0\n" +
"obfs4 193.11.166.194:27025 1AE2C08904527FEA90C4C4F8C1083EA59FBC6FAF cert=ItvYZzW5tn6v3G4UnQa6Qz04Npro6e81AP70YujmK/KXwDFPTs3aHXcHp4n8Vt6w/bv8cA iat-mode=0\n" +
"obfs4 45.145.95.6:27015 C5B7CD6946FF10C5B3E89691A7D3F2C122D2117C cert=TD7PbUO0/0k6xYHMPW3vJxICfkMZNdkRrb63Zhl5j9dW3iRGiCx0A7mPhe5T2EDzQ35+Zw iat-mode=0\n" +
"obfs4 193.11.166.194:27015 2D82C2E354D531A68469ADF7F878FA6060C6BACA cert=4TLQPJrTSaDffMK7Nbao6LC7G9OW/NHkUwIdjLSS3KYf0Nv4/nQiiI8dY2TcsQx01NniOg iat-mode=0\n" +
"meek_lite 0.0.2.0:2 97700DFE9F483596DDA6264C4D7DF7641E1E39CE url=https://meek.azureedge.net/ front=ajax.aspnetcdn.com\n" +
"snowflake 192.0.2.3:1";
}

View File

@ -0,0 +1,15 @@
obfs4 85.31.186.98:443 011F2599C0E9B27EE74B353155E244813763C3E5 cert=ayq0XzCwhpdysn5o0EyDUbmSOx3X/oTEbzDMvczHOdBJKlvIdHHLJGkZARtT4dcBFArPPg iat-mode=0
obfs4 38.229.1.78:80 C8CBDB2464FC9804A69531437BCF2BE31FDD2EE4 cert=Hmyfd2ev46gGY7NoVxA9ngrPF2zCZtzskRTzoWXbxNkzeVnGFPWmrTtILRyqCTjHR+s9dg iat-mode=1
obfs4 146.57.248.225:22 10A6CD36A537FCE513A322361547444B393989F0 cert=K1gDtDAIcUfeLqbstggjIw2rtgIKqdIhUlHp82XRqNSq/mtAjp1BIC9vHKJ2FAEpGssTPw iat-mode=0
obfs4 209.148.46.65:443 74FAD13168806246602538555B5521A0383A1875 cert=ssH+9rP8dG2NLDN2XuFw63hIO/9MNNinLmxQDpVa+7kTOa9/m+tGWT1SmSYpQ9uTBGa6Hw iat-mode=0
obfs4 37.218.245.14:38224 D9A82D2F9C2F65A18407B1D2B764F130847F8B5D cert=bjRaMrr1BRiAW8IE9U5z27fQaYgOhX1UCmOpg2pFpoMvo6ZgQMzLsaTzzQNTlm7hNcb+Sg iat-mode=0
obfs4 85.31.186.26:443 91A6354697E6B02A386312F68D82CF86824D3606 cert=PBwr+S8JTVZo6MPdHnkTwXJPILWADLqfMGoVvhZClMq/Urndyd42BwX9YFJHZnBB3H0XCw iat-mode=0
obfs4 193.11.166.194:27020 86AC7B8D430DAC4117E9F42C9EAED18133863AAF cert=0LDeJH4JzMDtkJJrFphJCiPqKx7loozKN7VNfuukMGfHO0Z8OGdzHVkhVAOfo1mUdv9cMg iat-mode=0
obfs4 38.229.33.83:80 0BAC39417268B96B9F514E7F63FA6FBA1A788955 cert=VwEFpk9F/UN9JED7XpG1XOjm/O8ZCXK80oPecgWnNDZDv5pdkhq1OpbAH0wNqOT6H6BmRQ iat-mode=1
obfs4 192.95.36.142:443 CDF2E852BF539B82BD10E27E9115A31734E378C2 cert=qUVQ0srL1JI/vO6V6m/24anYXiJD3QP2HgzUKQtQ7GRqqUvs7P+tG43RtAqdhLOALP7DJQ iat-mode=1
obfs4 51.222.13.177:80 5EDAC3B810E12B01F6FD8050D2FD3E277B289A08 cert=2uplIpLQ0q9+0qMFrK5pkaYRDOe460LL9WHBvatgkuRr/SL31wBOEupaMMJ6koRE6Ld0ew iat-mode=0
obfs4 193.11.166.194:27025 1AE2C08904527FEA90C4C4F8C1083EA59FBC6FAF cert=ItvYZzW5tn6v3G4UnQa6Qz04Npro6e81AP70YujmK/KXwDFPTs3aHXcHp4n8Vt6w/bv8cA iat-mode=0
obfs4 45.145.95.6:27015 C5B7CD6946FF10C5B3E89691A7D3F2C122D2117C cert=TD7PbUO0/0k6xYHMPW3vJxICfkMZNdkRrb63Zhl5j9dW3iRGiCx0A7mPhe5T2EDzQ35+Zw iat-mode=0
obfs4 193.11.166.194:27015 2D82C2E354D531A68469ADF7F878FA6060C6BACA cert=4TLQPJrTSaDffMK7Nbao6LC7G9OW/NHkUwIdjLSS3KYf0Nv4/nQiiI8dY2TcsQx01NniOg iat-mode=0
meek_lite 0.0.2.0:2 97700DFE9F483596DDA6264C4D7DF7641E1E39CE url=https://meek.azureedge.net/ front=ajax.aspnetcdn.com
snowflake 192.0.2.3:1

Binary file not shown.

View File

@ -2,12 +2,12 @@
<resources>
<string name="app_name">Orion</string>
<string name="orbot_vpn">Orion VPN</string>
<string name="app_description">Orbot is a free proxy app that empowers other apps to use the internet more securely. Orbot uses Tor to encrypt your Internet traffic and then hides it by bouncing through a series of computers around the world. Tor is free software and an open network that helps you defend against a form of network surveillance that threatens personal freedom and privacy, confidential business activities and relationships, and state security known as traffic analysis.</string>
<string name="status_starting_up">Orbot is Starting&#8230;</string>
<string name="app_description">Orion is a free proxy app that empowers other apps to use the internet more securely. Orion uses Tor to encrypt your Internet traffic and then hides it by bouncing through a series of computers around the world. Tor is free software and an open network that helps you defend against a form of network surveillance that threatens personal freedom and privacy, confidential business activities and relationships, and state security known as traffic analysis.</string>
<string name="status_starting_up">Orion is Starting&#8230;</string>
<string name="status_activated">Connected to the Tor Network</string>
<string name="status_disabled">Orbot is Deactivated</string>
<string name="status_disabled">Orion is Deactivated</string>
<string name="open_orbot_to_connect_to_tor">Connecting with tor network</string>
<string name="status_shutting_down">Orbot is Shutting Down</string>
<string name="status_shutting_down">Orion is Shutting Down</string>
<string name="connect_to_tor">Connect to Tor</string>
<string name="couldn_t_start_tor_process_">Couldn\'t start Tor process: </string>

View File

@ -0,0 +1 @@
o/jetified-tor-android-runtime