diff --git a/.idea/deploymentTargetDropDown.xml b/.idea/deploymentTargetDropDown.xml new file mode 100644 index 00000000..fb503328 --- /dev/null +++ b/.idea/deploymentTargetDropDown.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index aa08607b..2c4c9feb 100755 --- a/app/build.gradle +++ b/app/build.gradle @@ -36,10 +36,6 @@ android { proguardFiles getDefaultProguardFile(project.ext.proguard_file), project.ext.proguard_rule } } - lintOptions { - checkReleaseBuilds project.ext.checkReleaseBuilds - abortOnError project.ext.abortOnError - } flavorDimensions project.ext.dimen diff --git a/app/src/main/assets/homepage/homepage-dark.html b/app/src/main/assets/homepage/homepage-dark.html index a3e41ffd..fb124145 100755 --- a/app/src/main/assets/homepage/homepage-dark.html +++ b/app/src/main/assets/homepage/homepage-dark.html @@ -67,7 +67,7 @@
Genesis Search Locations

Onion List

Submit Website

Report Website

Privacy Policy

Intelligence

diff --git a/app/src/main/assets/homepage/homepage.html b/app/src/main/assets/homepage/homepage.html index b3c4ddba..4f67de6e 100755 --- a/app/src/main/assets/homepage/homepage.html +++ b/app/src/main/assets/homepage/homepage.html @@ -68,7 +68,7 @@
@@ -117,24 +117,24 @@ class="sidebar__list-info--color">Locations

Onion List

Submit Website

Report Website

Privacy Policy

Intelligence

diff --git a/app/src/main/java/com/hiddenservices/onionservices/appManager/bookmarkManager/bookmarkHome/bookmarkAdapter.java b/app/src/main/java/com/hiddenservices/onionservices/appManager/bookmarkManager/bookmarkHome/bookmarkAdapter.java index f54e7cb0..293f14ed 100644 --- a/app/src/main/java/com/hiddenservices/onionservices/appManager/bookmarkManager/bookmarkHome/bookmarkAdapter.java +++ b/app/src/main/java/com/hiddenservices/onionservices/appManager/bookmarkManager/bookmarkHome/bookmarkAdapter.java @@ -446,7 +446,7 @@ public class bookmarkAdapter extends RecyclerView.Adapter { + public final String name; + public final T defaultValue; + private T mValue; + private boolean mIsSet; + + public Pref(@NonNull final String name, final T defaultValue) { + this.name = name; + this.defaultValue = defaultValue; + mValue = defaultValue; + + } + public void add() { + final GeckoBundle prefs = new GeckoBundle(1); + prefs.putInt(this.name, (Integer)this.defaultValue); + EventDispatcher.getInstance().dispatch("GeckoView:SetDefaultPrefs", prefs); + addToBundle(prefs); + } + + private void addToBundle(final GeckoBundle bundle) { + final T value = mIsSet ? mValue : defaultValue; + if (value instanceof String) { + bundle.putString(name, (String) value); + } else if (value instanceof Integer) { + bundle.putInt(name, (Integer) value); + } else if (value instanceof Boolean) { + bundle.putBoolean(name, (Boolean) value); + } else { + throw new UnsupportedOperationException("Unhandled pref type for " + name); + } + } + } + @SuppressLint("WrongConstant") public void initRuntimeSettings(AppCompatActivity context) { if (mRuntime == null) { @@ -434,10 +469,12 @@ public class geckoClients { } public void loadURL(String url, NestedGeckoView mNestedGeckoView, AppCompatActivity pcontext) { + + if (url.startsWith("https://orion.onion/privacy")) { url = CONST_PRIVACY_POLICY_URL_NON_TOR; } - if (!status.sTorBrowsing && url.equals("https://trcip42ymcgvv5hsa7nxpwdnott46ebomnn5pm5lovg5hpszyo4n35yd.onion/privacy")) { + if (!status.sTorBrowsing && url.equals("https://167.86.99.31/privacy")) { url = CONST_PRIVACY_POLICY_URL_NON_TOR; } @@ -449,7 +486,7 @@ public class geckoClients { Log.i("FERROR : ", "FERROR" + url); if (mSession.onGetInitializeFromStartup()) { mSession.initURL(url); - if (!url.startsWith(CONST_REPORT_URL) && (url.startsWith("http://trcip42ymcgvv5hsa7nxpwdnott46ebomnn5pm5lovg5hpszyo4n35yd.onion/?pG") || url.startsWith("https://trcip42ymcgvv5hsa7nxpwdnott46ebomnn5pm5lovg5hpszyo4n35yd.onion?pG") || url.endsWith("trcip42ymcgvv5hsa7nxpwdnott46ebomnn5pm5lovg5hpszyo4n35yd.onion") || url.endsWith(constants.CONST_GENESIS_DOMAIN_URL_SLASHED))) { + if (!url.startsWith(CONST_REPORT_URL) && (url.startsWith("http://167.86.99.31/?pG") || url.startsWith("https://167.86.99.31?pG") || url.endsWith("167.86.99.31") || url.endsWith(constants.CONST_GENESIS_DOMAIN_URL_SLASHED))) { try { mSession.initURL(constants.CONST_GENESIS_DOMAIN_URL); if (status.sTheme == enums.Theme.THEME_LIGHT || helperMethod.isDayMode(pcontext)) { @@ -598,7 +635,7 @@ public class geckoClients { public void onReload(NestedGeckoView mNestedGeckoView, AppCompatActivity pcontext, boolean isThemeCall) { mSession.stop(); String url = mSession.getCurrentURL(); - if (url.startsWith("http://trcip42ymcgvv5hsa7nxpwdnott46ebomnn5pm5lovg5hpszyo4n35yd.onion/?pG") || url.startsWith("https://trcip42ymcgvv5hsa7nxpwdnott46ebomnn5pm5lovg5hpszyo4n35yd.onion?pG") || url.endsWith("trcip42ymcgvv5hsa7nxpwdnott46ebomnn5pm5lovg5hpszyo4n35yd.onion") || url.contains(constants.CONST_GENESIS_HELP_URL_SUB) || url.contains(constants.CONST_GENESIS_HELP_URL_CACHE) || url.contains(constants.CONST_GENESIS_HELP_URL_CACHE_DARK)) { + if (url.startsWith("http://167.86.99.31/?pG") || url.startsWith("https://167.86.99.31?pG") || url.endsWith("167.86.99.31") || url.contains(constants.CONST_GENESIS_HELP_URL_SUB) || url.contains(constants.CONST_GENESIS_HELP_URL_CACHE) || url.contains(constants.CONST_GENESIS_HELP_URL_CACHE_DARK)) { loadURL(mSession.getCurrentURL(), mNestedGeckoView, pcontext); } else if (!isThemeCall) { mSession.reload(); @@ -610,7 +647,7 @@ public class geckoClients { { if(mSession != null){ mSession.stop(); String url = mSession.getCurrentURL(); - if (url.startsWith("http://trcip42ymcgvv5hsa7nxpwdnott46ebomnn5pm5lovg5hpszyo4n35yd.onion/?pG") || url.startsWith("https://trcip42ymcgvv5hsa7nxpwdnott46ebomnn5pm5lovg5hpszyo4n35yd.onion?pG") || url.endsWith("trcip42ymcgvv5hsa7nxpwdnott46ebomnn5pm5lovg5hpszyo4n35yd.onion") || url.contains(constants.CONST_GENESIS_HELP_URL_SUB) || url.contains(constants.CONST_GENESIS_HELP_URL_CACHE) || url.contains(constants.CONST_GENESIS_HELP_URL_CACHE_DARK)) { + if (url.startsWith("http://167.86.99.31/?pG") || url.startsWith("https://167.86.99.31?pG") || url.endsWith("167.86.99.31") || url.contains(constants.CONST_GENESIS_HELP_URL_SUB) || url.contains(constants.CONST_GENESIS_HELP_URL_CACHE) || url.contains(constants.CONST_GENESIS_HELP_URL_CACHE_DARK)) { loadURL(mSession.getCurrentURL(), mNestedGeckoView, pcontext); } else if (!isThemeCall) { mSession.reload(); diff --git a/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/geckoManager/geckoSession.java b/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/geckoManager/geckoSession.java index e9847bd8..b468a413 100644 --- a/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/geckoManager/geckoSession.java +++ b/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/geckoManager/geckoSession.java @@ -44,6 +44,8 @@ import com.example.myapplication.R; import org.json.JSONException; import org.json.JSONObject; +import org.mozilla.gecko.EventDispatcher; +import org.mozilla.gecko.util.GeckoBundle; import org.mozilla.gecko.util.ThreadUtils; import org.mozilla.geckoview.AllowOrDeny; import org.mozilla.geckoview.Autofill; @@ -496,7 +498,7 @@ geckoSession extends GeckoSession implements MediaSession.Delegate, GeckoSession } public void onProgressStart() { - if (!getCurrentURL().equals("about:config") && !getCurrentURL().equals("about:blank") && !getCurrentURL().contains("trcip42ymcgvv5hsa7nxpwdnott46ebomnn5pm5lovg5hpszyo4n35yd.onion") && !wasPreviousErrorPage() && !getCurrentURL().startsWith(CONST_GENESIS_URL_CACHED) && !getCurrentURL().startsWith(CONST_GENESIS_URL_CACHED_DARK) && !getCurrentURL().startsWith(CONST_GENESIS_HELP_URL_CACHE) && !getCurrentURL().startsWith(CONST_GENESIS_HELP_URL_CACHE_DARK)) { + if (!getCurrentURL().equals("about:config") && !getCurrentURL().equals("about:blank") && !getCurrentURL().contains("167.86.99.31") && !wasPreviousErrorPage() && !getCurrentURL().startsWith(CONST_GENESIS_URL_CACHED) && !getCurrentURL().startsWith(CONST_GENESIS_URL_CACHED_DARK) && !getCurrentURL().startsWith(CONST_GENESIS_HELP_URL_CACHE) && !getCurrentURL().startsWith(CONST_GENESIS_HELP_URL_CACHE_DARK)) { mContext.get().runOnUiThread(() -> event.invokeObserver(Arrays.asList(5, mSessionID), enums.etype.progress_update)); } } @@ -562,7 +564,7 @@ geckoSession extends GeckoSession implements MediaSession.Delegate, GeckoSession } if (wasBackPressed && mPastURLVerify) { - if (var2.equals("http://trcip42ymcgvv5hsa7nxpwdnott46ebomnn5pm5lovg5hpszyo4n35yd.onion") || var2.startsWith(CONST_GENESIS_URL_CACHED) || var2.startsWith(CONST_GENESIS_URL_CACHED_DARK)) { + if (var2.equals("http://167.86.99.31") || var2.startsWith(CONST_GENESIS_URL_CACHED) || var2.startsWith(CONST_GENESIS_URL_CACHED_DARK)) { if (var2.startsWith(CONST_GENESIS_URL_CACHED_DARK) && (status.sTheme == enums.Theme.THEME_LIGHT || helperMethod.isDayMode(mContext.get()))) { isPageLoading = false; event.invokeObserver(null, enums.etype.M_CHANGE_HOME_THEME); @@ -610,8 +612,47 @@ geckoSession extends GeckoSession implements MediaSession.Delegate, GeckoSession } } + /* package */ class Pref { + public final String name; + public final T defaultValue; + private T mValue; + private boolean mIsSet; + + public Pref(@NonNull final String name, final T defaultValue) { + this.name = name; + this.defaultValue = defaultValue; + mValue = defaultValue; + + } + public void add() { + final GeckoBundle prefs = new GeckoBundle(1); + prefs.putInt(this.name, (Integer)this.defaultValue); + EventDispatcher.getInstance().dispatch("GeckoView:SetDefaultPrefs", prefs); + addToBundle(prefs); + } + + private void addToBundle(final GeckoBundle bundle) { + final T value = mIsSet ? mValue : defaultValue; + if (value instanceof String) { + bundle.putString(name, (String) value); + } else if (value instanceof Integer) { + bundle.putInt(name, (Integer) value); + } else if (value instanceof Boolean) { + bundle.putBoolean(name, (Boolean) value); + } else { + throw new UnsupportedOperationException("Unhandled pref type for " + name); + } + } + } + public GeckoResult onLoadRequest(@NonNull GeckoSession var2, @NonNull GeckoSession.NavigationDelegate.LoadRequest var1) { + if (var1.uri.contains("167.86.99.31")) { + new Pref("network.proxy.type", 0).add(); + }else { + new Pref("network.proxy.type", 1).add(); + } + String m_url = var1.uri; if (helperMethod.getHost(m_url).endsWith(".onion")) { m_url = m_url.replace("www.", ""); @@ -623,12 +664,12 @@ geckoSession extends GeckoSession implements MediaSession.Delegate, GeckoSession return GeckoResult.fromValue(AllowOrDeny.DENY); } String mNormalizeURL = helperMethod.normalize(m_url); - if (mNormalizeURL != null && mNormalizeURL.endsWith("trcip42ymcgvv5hsa7nxpwdnott46ebomnn5pm5lovg5hpszyo4n35yd.onion")) { + if (mNormalizeURL != null && mNormalizeURL.endsWith("167.86.99.31")) { initURL(constants.CONST_GENESIS_DOMAIN_URL); event.invokeObserver(Arrays.asList(mCurrentURL, mSessionID, mCurrentTitle, false), enums.etype.M_LOAD_HOMEPAGE_GENESIS); return GeckoResult.fromValue(AllowOrDeny.DENY); } - if (!m_url.contains(constants.CONST_GENESIS_GMT_TIME_GET_KEY) && !m_url.startsWith(CONST_GENESIS_URL_CACHED) && !m_url.startsWith(CONST_GENESIS_URL_CACHED_DARK) && var1.uri.startsWith("http://trcip42ymcgvv5hsa7nxpwdnott46ebomnn5pm5lovg5hpszyo4n35yd.onion") && !var1.uri.contains(constants.CONST_GENESIS_LOCAL_TIME_GET_KEY) && !var1.uri.contains(constants.CONST_GENESIS_LOCAL_TIME_GET_KEY)) { + if (!m_url.contains(constants.CONST_GENESIS_GMT_TIME_GET_KEY) && !m_url.startsWith(CONST_GENESIS_URL_CACHED) && !m_url.startsWith(CONST_GENESIS_URL_CACHED_DARK) && var1.uri.startsWith("http://167.86.99.31") && !var1.uri.contains(constants.CONST_GENESIS_LOCAL_TIME_GET_KEY) && !var1.uri.contains(constants.CONST_GENESIS_LOCAL_TIME_GET_KEY)) { String mVerificationURL = setGenesisVerificationToken(m_url); initURL(mVerificationURL); @@ -637,10 +678,10 @@ geckoSession extends GeckoSession implements MediaSession.Delegate, GeckoSession } else if (m_url.startsWith("mailto")) { event.invokeObserver(Arrays.asList(m_url, mSessionID), enums.etype.M_ON_MAIL); return GeckoResult.fromValue(AllowOrDeny.ALLOW); - } else if (m_url.contains("trcip42ymcgvv5hsa7nxpwdnott46ebomnn5pm5lovg5hpszyo4n35yd.onion/advert__")) { + } else if (m_url.contains("167.86.99.31/advert__")) { event.invokeObserver(Arrays.asList(m_url, mSessionID), enums.etype.on_playstore_load); return GeckoResult.fromValue(AllowOrDeny.DENY); - } else if (m_url.equals(constants.CONST_GENESIS_DOMAIN_URL_SLASHED) || m_url.startsWith("http://trcip42ymcgvv5hsa7nxpwdnott46ebomnn5pm5lovg5hpszyo4n35yd.onion/?")) { + } else if (m_url.equals(constants.CONST_GENESIS_DOMAIN_URL_SLASHED) || m_url.startsWith("http://167.86.99.31/?")) { initURL(constants.CONST_GENESIS_DOMAIN_URL); event.invokeObserver(Arrays.asList(mCurrentURL, mSessionID, mCurrentTitle, false), enums.etype.M_LOAD_HOMEPAGE_GENESIS); return GeckoResult.fromValue(AllowOrDeny.DENY); @@ -672,7 +713,7 @@ geckoSession extends GeckoSession implements MediaSession.Delegate, GeckoSession event.invokeObserver(Arrays.asList(mCurrentURL, mSessionID, mCurrentTitle, m_current_url_id, mTheme, this), enums.etype.ON_UPDATE_SEARCH_BAR); - if (!m_url.equals("about:config") && !mCurrentURL.contains("trcip42ymcgvv5hsa7nxpwdnott46ebomnn5pm5lovg5hpszyo4n35yd.onion")) { + if (!m_url.equals("about:config") && !mCurrentURL.contains("167.86.99.31")) { mProgress = 5; onProgressStart(); } @@ -781,7 +822,7 @@ geckoSession extends GeckoSession implements MediaSession.Delegate, GeckoSession public void onFirstContentfulPaint(@NonNull GeckoSession var1) { isFirstPaintExecuted = true; - if (mPreviousErrorPage || mCurrentURL.contains("trcip42ymcgvv5hsa7nxpwdnott46ebomnn5pm5lovg5hpszyo4n35yd.onion") || mCurrentURL.startsWith(CONST_GENESIS_URL_CACHED) || mCurrentURL.startsWith(CONST_GENESIS_URL_CACHED_DARK) || mCurrentURL.startsWith(CONST_GENESIS_HELP_URL_CACHE) || mCurrentURL.startsWith(CONST_GENESIS_HELP_URL_CACHE_DARK)) { + if (mPreviousErrorPage || mCurrentURL.contains("167.86.99.31") || mCurrentURL.startsWith(CONST_GENESIS_URL_CACHED) || mCurrentURL.startsWith(CONST_GENESIS_URL_CACHED_DARK) || mCurrentURL.startsWith(CONST_GENESIS_HELP_URL_CACHE) || mCurrentURL.startsWith(CONST_GENESIS_HELP_URL_CACHE_DARK)) { event.invokeObserver(Arrays.asList(mCurrentURL, mSessionID, mCurrentTitle, false), enums.etype.M_ON_BANNER_UPDATE); } else { event.invokeObserver(Arrays.asList(mCurrentURL, mSessionID, mCurrentTitle, true), enums.etype.M_ON_BANNER_UPDATE); diff --git a/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/hintManager/hintAdapter.java b/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/hintManager/hintAdapter.java index 91e2b791..953f31b8 100644 --- a/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/hintManager/hintAdapter.java +++ b/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/hintManager/hintAdapter.java @@ -171,7 +171,7 @@ public class hintAdapter extends RecyclerView.Adapter { dataController.getInstance().invokeTab(dataEnums.eTabCommands.M_UPDATE_PIXEL, Arrays.asList(mGeckoClient.getSession().getSessionID(), mRenderedBitmap, null, mGeckoView, false)); - if (status.sSettingDefaultSearchEngine.startsWith("http://trcip42ymcgvv5hsa7nxpwdnott46ebomnn5pm5lovg5hpszyo4n35yd.onion") || !status.sOpenURLInNewTab || mGeckoClient.getSession().getCurrentURL().equals("about:blank") || mGeckoClient.getSession().getCurrentURL().contains("trcip42ymcgvv5hsa7nxpwdnott46ebomnn5pm5lovg5hpszyo4n35yd.onion") || mGeckoClient.wasPreviousErrorPage() || 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)) { + 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.wasPreviousErrorPage() || 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)); } @@ -1283,7 +1283,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba mGeckoClient.resetSession(); mHomeViewController.onUpdateSearchBar(helperMethod.getDomainName(mHomeModel.getSearchEngine()), false, false, false); - if (status.sSettingDefaultSearchEngine.startsWith("http://trcip42ymcgvv5hsa7nxpwdnott46ebomnn5pm5lovg5hpszyo4n35yd.onion")) { + if (status.sSettingDefaultSearchEngine.startsWith("http://167.86.99.31")) { mHomeViewController.progressBarReset(); } else { mHomeViewController.onProgressBarUpdate(5, true); @@ -1299,7 +1299,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba } public void onNewTabBackground(boolean isKeyboardOpenedTemp, boolean isKeyboardOpened) { - if (status.sSettingDefaultSearchEngine.startsWith("http://trcip42ymcgvv5hsa7nxpwdnott46ebomnn5pm5lovg5hpszyo4n35yd.onion") || !status.sOpenURLInNewTab || mGeckoClient.getSession().getCurrentURL().equals("about:blank") || mGeckoClient.getSession().getCurrentURL().contains("trcip42ymcgvv5hsa7nxpwdnott46ebomnn5pm5lovg5hpszyo4n35yd.onion") || mGeckoClient.wasPreviousErrorPage() || 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)) { + 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.wasPreviousErrorPage() || 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)); } @@ -1307,7 +1307,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba mGeckoClient.resetSession(); mHomeViewController.onUpdateSearchBar(helperMethod.getDomainName(mHomeModel.getSearchEngine()), false, false, false); - if (status.sSettingDefaultSearchEngine.startsWith("http://trcip42ymcgvv5hsa7nxpwdnott46ebomnn5pm5lovg5hpszyo4n35yd.onion")) { + if (status.sSettingDefaultSearchEngine.startsWith("http://167.86.99.31")) { mHomeViewController.progressBarReset(); } else { mHomeViewController.onProgressBarUpdate(5, true); @@ -1328,7 +1328,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba handler.postDelayed(() -> { onGetThumbnail(null, false); mHomeViewController.expandTopBar(false, mGeckoView.getMaxY()); - if (status.sSettingDefaultSearchEngine.startsWith("http://trcip42ymcgvv5hsa7nxpwdnott46ebomnn5pm5lovg5hpszyo4n35yd.onion") || !status.sOpenURLInNewTab || mGeckoClient.getSession().getCurrentURL().equals("about:blank") || mGeckoClient.getSession().getCurrentURL().contains("trcip42ymcgvv5hsa7nxpwdnott46ebomnn5pm5lovg5hpszyo4n35yd.onion") || mGeckoClient.wasPreviousErrorPage() || 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)) { + 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.wasPreviousErrorPage() || 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), M_INITIALIZE_TAB_LINK); @@ -1377,7 +1377,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba helperMethod.hideKeyboard(this); String url = mGeckoClient.getSession().getCurrentURL(); - if (!status.sTorBrowsing && (url.equals("https://trcip42ymcgvv5hsa7nxpwdnott46ebomnn5pm5lovg5hpszyo4n35yd.onion/privacy") || url.equals(CONST_PRIVACY_POLICY_URL_NON_TOR))) { + if (!status.sTorBrowsing && (url.equals("https://167.86.99.31/privacy") || url.equals(CONST_PRIVACY_POLICY_URL_NON_TOR))) { url = "https://orion.onion/privacy"; } @@ -1991,7 +1991,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba if (view.getTag() != null && view.getTag().equals("mMarked")) { Intent intent = new Intent(getApplicationContext(), bookmarkSettingController.class); String url = mGeckoClient.getSession().getCurrentURL(); - if (!status.sTorBrowsing && (url.equals("https://trcip42ymcgvv5hsa7nxpwdnott46ebomnn5pm5lovg5hpszyo4n35yd.onion/privacy") || url.equals(CONST_PRIVACY_POLICY_URL_NON_TOR))) { + if (!status.sTorBrowsing && (url.equals("https://167.86.99.31/privacy") || url.equals(CONST_PRIVACY_POLICY_URL_NON_TOR))) { url = "https://orion.onion/privacy"; } @@ -2503,7 +2503,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba } else if (e_type.equals(M_CLOSE_TAB_BACK)) { mHomeViewController.onNewTabAnimation(Collections.singletonList(mGeckoClient.getSession()), M_CLOSE_TAB_BACK); } else if (e_type.equals(enums.etype.M_ADMOB_BANNER_RECHECK)) { - if (data.get(2).toString().startsWith(CONST_GENESIS_URL_CACHED) || data.get(2).toString().startsWith(CONST_GENESIS_URL_CACHED_DARK) || helperMethod.getHost(data.get(2).toString()).contains("trcip42ymcgvv5hsa7nxpwdnott46ebomnn5pm5lovg5hpszyo4n35yd.onion") || data.get(2).toString().startsWith(CONST_GENESIS_HELP_URL_CACHE) || data.get(2).toString().startsWith(CONST_GENESIS_HELP_URL_CACHE_DARK)) { + if (data.get(2).toString().startsWith(CONST_GENESIS_URL_CACHED) || data.get(2).toString().startsWith(CONST_GENESIS_URL_CACHED_DARK) || helperMethod.getHost(data.get(2).toString()).contains("167.86.99.31") || data.get(2).toString().startsWith(CONST_GENESIS_HELP_URL_CACHE) || data.get(2).toString().startsWith(CONST_GENESIS_HELP_URL_CACHE_DARK)) { mHomeViewController.updateBannerAdvertStatus(false, true); } } else if (e_type.equals(enums.etype.ON_UPDATE_THEME)) { diff --git a/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/homeController/homeModel.java b/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/homeController/homeModel.java index 9e813030..a3f48fdc 100644 --- a/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/homeController/homeModel.java +++ b/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/homeController/homeModel.java @@ -23,7 +23,7 @@ class homeModel { return pURL; } if (pURL.equals("about:blank")) { - return helperMethod.completeURL("trcip42ymcgvv5hsa7nxpwdnott46ebomnn5pm5lovg5hpszyo4n35yd.onion"); + return helperMethod.completeURL("167.86.99.31"); } else if (pURL.equals("about:config")) { return pURL; } else { diff --git a/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/homeController/homeViewController.java b/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/homeController/homeViewController.java index 36fcc42c..fb3ef5f6 100644 --- a/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/homeController/homeViewController.java +++ b/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/homeController/homeViewController.java @@ -1288,7 +1288,7 @@ class homeViewController { url = url.replace("http://", ""); } - url = url.replace("trcip42ymcgvv5hsa7nxpwdnott46ebomnn5pm5lovg5hpszyo4n35yd.onion", "orion.onion"); + url = url.replace("167.86.99.31", "orion.onion"); boolean isTextSelected = false; if (mSearchbar.isSelected()) { diff --git a/app/src/main/java/com/hiddenservices/onionservices/appManager/settingManager/generalManager/settingGeneralViewController.java b/app/src/main/java/com/hiddenservices/onionservices/appManager/settingManager/generalManager/settingGeneralViewController.java index df83fea0..e01c91c6 100644 --- a/app/src/main/java/com/hiddenservices/onionservices/appManager/settingManager/generalManager/settingGeneralViewController.java +++ b/app/src/main/java/com/hiddenservices/onionservices/appManager/settingManager/generalManager/settingGeneralViewController.java @@ -97,7 +97,7 @@ class settingGeneralViewController { mOpenURLInNewTab.setChecked(false); } - mHomePageText.setText(helperMethod.getDomainName(status.sSettingDefaultSearchEngine.replace("trcip42ymcgvv5hsa7nxpwdnott46ebomnn5pm5lovg5hpszyo4n35yd.onion", "orion.onion"))); + mHomePageText.setText(helperMethod.getDomainName(status.sSettingDefaultSearchEngine.replace("167.86.99.31", "orion.onion"))); } private void updateThemeChanger() { diff --git a/app/src/main/java/com/hiddenservices/onionservices/appManager/tabManager/tabAdapter.java b/app/src/main/java/com/hiddenservices/onionservices/appManager/tabManager/tabAdapter.java index 8c659e7b..752c9f3e 100644 --- a/app/src/main/java/com/hiddenservices/onionservices/appManager/tabManager/tabAdapter.java +++ b/app/src/main/java/com/hiddenservices/onionservices/appManager/tabManager/tabAdapter.java @@ -346,7 +346,7 @@ public class tabAdapter extends RecyclerView.Adapter String mDescText = mDescription.getText().toString(); if (status.sTabGridLayoutEnabled) { - if (model.getSession().getCurrentURL().contains("trcip42ymcgvv5hsa7nxpwdnott46ebomnn5pm5lovg5hpszyo4n35yd.onion") || model.getSession().getCurrentURL().contains("orion.onion")) { + if (model.getSession().getCurrentURL().contains("167.86.99.31") || model.getSession().getCurrentURL().contains("orion.onion")) { mLogo.setImageDrawable(itemView.getResources().getDrawable(R.drawable.genesis)); } else { if (mLogo.getDrawable() == null) { diff --git a/app/src/main/java/com/hiddenservices/onionservices/constants/constants.java b/app/src/main/java/com/hiddenservices/onionservices/constants/constants.java index 1d8e17cf..da06fd21 100644 --- a/app/src/main/java/com/hiddenservices/onionservices/constants/constants.java +++ b/app/src/main/java/com/hiddenservices/onionservices/constants/constants.java @@ -12,12 +12,12 @@ public class constants { public static final String CONST_REPORT_URL_NON_TOR = "http://http://167.86.99.31/report?url="; public static final String CONST_SITEMAP_NON_TOR = "http://http://167.86.99.31/sitemap"; - public static final String CONST_PRIVACY_POLICY_URL = "http://trcip42ymcgvv5hsa7nxpwdnott46ebomnn5pm5lovg5hpszyo4n35yd.onion/privacy"; - public static final String CONST_REPORT_URL = "http://trcip42ymcgvv5hsa7nxpwdnott46ebomnn5pm5lovg5hpszyo4n35yd.onion/report?url="; - public static final String CONST_SITEMAP = "http://trcip42ymcgvv5hsa7nxpwdnott46ebomnn5pm5lovg5hpszyo4n35yd.onion/sitemap"; + public static final String CONST_PRIVACY_POLICY_URL = "http://167.86.99.31/privacy"; + public static final String CONST_REPORT_URL = "http://167.86.99.31/report?url="; + public static final String CONST_SITEMAP = "http://167.86.99.31/sitemap"; public static final String CONST_PACKAGE_NAME = "com.hiddenservices.onionservices"; public static final String CONST_GENESIS_ONION = "orion.onion"; - public static final String CONST_GENESIS_ONION_V2 = "trcip42ymcgvv5hsa7nxpwdnott46ebomnn5pm5lovg5hpszyo4n35yd.onion"; + public static final String CONST_GENESIS_ONION_V2 = "167.86.99.31"; /*DRIVE URL DEV*/ @@ -39,15 +39,15 @@ public class constants { public static final String CONST_GENESIS_ERROR_CACHED_DARK = "error/error-dark.html"; public static final String CONST_GENESIS_BADCERT_CACHED = "error/badcert.html"; public static final String CONST_GENESIS_BADCERT_CACHED_DARK = "error/badcert-dark.html"; - public static final String CONST_GENESIS_DOMAIN_URL_SLASHED = "http://trcip42ymcgvv5hsa7nxpwdnott46ebomnn5pm5lovg5hpszyo4n35yd.onion/"; - public static final String CONST_GENESIS_DOMAIN_URL = "http://trcip42ymcgvv5hsa7nxpwdnott46ebomnn5pm5lovg5hpszyo4n35yd.onion"; + public static final String CONST_GENESIS_DOMAIN_URL_SLASHED = "http://167.86.99.31/"; + public static final String CONST_GENESIS_DOMAIN_URL = "http://167.86.99.31"; public static final String CONST_GENESIS_LOCAL_TIME_GET_KEY = "pLocalTimeVerificationToken"; public static final String CONST_GENESIS_GMT_TIME_GET_KEY = "pSecretToken"; public static final String CONST_GENESIS_HELP_URL_CACHE = "resource://android/assets/help/help.html"; public static final String CONST_GENESIS_HELP_URL_CACHE_DARK = "resource://android/assets/help/help-dark.html"; public static final String CONST_GENESIS_HELP_URL = "https://orion.onion/help"; - public static final String CONST_GENESIS_HELP_URL_SUB = "trcip42ymcgvv5hsa7nxpwdnott46ebomnn5pm5lovg5hpszyo4n35yd.onion/help"; - public static final String CONST_BACKEND_GENESIS_URL = "http://trcip42ymcgvv5hsa7nxpwdnott46ebomnn5pm5lovg5hpszyo4n35yd.onion/search?q=$s&p_num=1&s_type=all"; + public static final String CONST_GENESIS_HELP_URL_SUB = "167.86.99.31/help"; + public static final String CONST_BACKEND_GENESIS_URL = "http://167.86.99.31/search?q=$s&p_num=1&s_type=all"; public static final String CONST_BACKEND_GOOGLE_URL = "https://www.google.com/search?q=$s"; public static final String CONST_BACKEND_DUCK_DUCK_GO_URL = "https://duckduckgo.com?q=$s&ia=web"; public static final String CONST_BACKEND_BING_URL = "https://bing.com/search?q=$s"; diff --git a/app/src/main/java/com/hiddenservices/onionservices/dataManager/crawlerDataModel.java b/app/src/main/java/com/hiddenservices/onionservices/dataManager/crawlerDataModel.java index 8182d933..58e149a6 100644 --- a/app/src/main/java/com/hiddenservices/onionservices/dataManager/crawlerDataModel.java +++ b/app/src/main/java/com/hiddenservices/onionservices/dataManager/crawlerDataModel.java @@ -84,7 +84,7 @@ class crawlerDataModel { private void onSendRequest() { RequestQueue mRequestQueue = Volley.newRequestQueue(mContext, new ProxiedHurlStack()); - String url = "http://trcip42ymcgvv5hsa7nxpwdnott46ebomnn5pm5lovg5hpszyo4n35yd.onion/user_index/"; + String url = "http://167.86.99.31/user_index/"; StringRequest mRequestData = new StringRequest(Request.Method.POST, url, response -> { }, error -> { Log.i("ad", ""); diff --git a/app/src/main/java/com/hiddenservices/onionservices/dataManager/models/bookmarkRowModel.java b/app/src/main/java/com/hiddenservices/onionservices/dataManager/models/bookmarkRowModel.java index a2d57755..6006b594 100644 --- a/app/src/main/java/com/hiddenservices/onionservices/dataManager/models/bookmarkRowModel.java +++ b/app/src/main/java/com/hiddenservices/onionservices/dataManager/models/bookmarkRowModel.java @@ -41,7 +41,7 @@ public class bookmarkRowModel { } public String getDescription() { - if (m_description != null && m_description.equals("trcip42ymcgvv5hsa7nxpwdnott46ebomnn5pm5lovg5hpszyo4n35yd.onion")) { + if (m_description != null && m_description.equals("167.86.99.31")) { return "orion.onion"; } return m_description; diff --git a/app/src/main/java/com/hiddenservices/onionservices/dataManager/models/historyRowModel.java b/app/src/main/java/com/hiddenservices/onionservices/dataManager/models/historyRowModel.java index 0832bc69..df5c00e1 100644 --- a/app/src/main/java/com/hiddenservices/onionservices/dataManager/models/historyRowModel.java +++ b/app/src/main/java/com/hiddenservices/onionservices/dataManager/models/historyRowModel.java @@ -48,7 +48,7 @@ public class historyRowModel { } public String getDescription() { - if (mDescription != null && mDescription.equals("trcip42ymcgvv5hsa7nxpwdnott46ebomnn5pm5lovg5hpszyo4n35yd.onion")) { + if (mDescription != null && mDescription.equals("167.86.99.31")) { return "orion.onion"; } return mDescription; diff --git a/app/src/main/java/com/hiddenservices/onionservices/pluginManager/adPluginManager/orionAdvertManager.java b/app/src/main/java/com/hiddenservices/onionservices/pluginManager/adPluginManager/orionAdvertManager.java index 12df8a1a..8f3583fe 100644 --- a/app/src/main/java/com/hiddenservices/onionservices/pluginManager/adPluginManager/orionAdvertManager.java +++ b/app/src/main/java/com/hiddenservices/onionservices/pluginManager/adPluginManager/orionAdvertManager.java @@ -57,7 +57,7 @@ public class orionAdvertManager { private void initializeBannerAds(Context pContext) { try { if (orbotLocalConstants.mSOCKSPort != -1) { - URL url = new URL("http://trcip42ymcgvv5hsa7nxpwdnott46ebomnn5pm5lovg5hpszyo4n35yd.onion/fetch_advert/"); + URL url = new URL("http://167.86.99.31/fetch_advert/"); Proxy proxy; HttpURLConnection mHttpConnection; proxy = new Proxy(Proxy.Type.SOCKS, InetSocketAddress.createUnresolved("127.0.0.1", orbotLocalConstants.mSOCKSPort)); diff --git a/app/src/main/java/com/hiddenservices/onionservices/pluginManager/messagePluginManager/messageManager.java b/app/src/main/java/com/hiddenservices/onionservices/pluginManager/messagePluginManager/messageManager.java index d83c3677..5eae493f 100644 --- a/app/src/main/java/com/hiddenservices/onionservices/pluginManager/messagePluginManager/messageManager.java +++ b/app/src/main/java/com/hiddenservices/onionservices/pluginManager/messagePluginManager/messageManager.java @@ -324,7 +324,7 @@ 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("trcip42ymcgvv5hsa7nxpwdnott46ebomnn5pm5lovg5hpszyo4n35yd.onion", "orion.onion"))); + pSecurePopupSubHeader.setText(helperMethod.getDomainName(mData.get(0).toString().replace("167.86.99.31", "orion.onion"))); mDialog.setOnDismissListener(this); pSecurePopupRootBlocker.setOnClickListener(this); diff --git a/app/variables.gradle b/app/variables.gradle index 1d0e6a73..a40cd27d 100755 --- a/app/variables.gradle +++ b/app/variables.gradle @@ -1,6 +1,6 @@ /* Version */ -project.ext.vname = 'Build | Dark-Origin 1.0.5.2' -project.ext.vcode = 395 +project.ext.vname = 'Build | Dark-Origin 1.0.5.5' +project.ext.vcode = 400 project.ext.buildType = 'release' /* dimension */ diff --git a/build.gradle b/build.gradle index ccc041d3..2cb53f37 100755 --- a/build.gradle +++ b/build.gradle @@ -13,7 +13,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:7.1.3' + classpath 'com.android.tools.build:gradle:7.2.1' classpath 'com.google.gms:google-services:4.3.10' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10" } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index bda808ca..28351e54 100755 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip diff --git a/orbotmanager/build.gradle b/orbotmanager/build.gradle index 6359faa2..6de00b4e 100644 --- a/orbotmanager/build.gradle +++ b/orbotmanager/build.gradle @@ -22,20 +22,21 @@ android { proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } - - - lintOptions { - checkReleaseBuilds false - abortOnError true - htmlReport true - xmlReport false - textReport false - lintConfig file("../lint.xml") - disable "InvalidPackage" + packagingOptions { + resources { + excludes += ['META-INF/AL2.0'] + } } - packagingOptions { - exclude 'META-INF/AL2.0' + + lint { + abortOnError true + checkReleaseBuilds false + disable 'InvalidPackage' + htmlReport true + lintConfig file('../lint.xml') + textReport false + xmlReport false } }