Business Client need Mobile App Development

Contact person: Business Client

Phone:Show

Email:Show

Location: Panjab, India

Budget: Recommended by industry experts

Time to start: As soon as possible

Project description:
"I want to implement a special "Smart Proxy Failover System" in my existing Flutter Android browser app. This system will automatically recognize blocked websites and reload them with the proxy turned on.
Project's core requirements: 1. Packet Capture & Content Analysis: The app will monitor every request. If no data is transferred within 5 seconds or if the HTML content is less than 3 KB within 7 seconds, the proxy will be activated. 2. Proxy Integration: Webshare rotating SOCKS5 gateway must be used. 3. Firebase Admin Control: The proxy IP, port, and credentials will be dynamically loaded from the Firebase Realtime Database. 4. Domain Sensitivity: The proxy will only work for specific domains. As soon as the domain changes, the proxy will be deactivated. 5. Single Reload Policy: To maintain a smooth user experience, the page will reload only once after the proxy is activated.
Below is the logic and basic code structure of my project. Please bid only if you understand this code and can perfectly implement proxy handling and authentication (Username/Password) using flutter_inappwebview.
Code ✓
import 'dart:async';
import 'package:flutter/[login to view URL]';
import 'package:flutter_inappwebview/[login to view URL]';
import 'package:firebase_database/[login to view URL]';

class SmartProxyBrowser extends StatefulWidget {
@override
_SmartProxyBrowserState createState() => _SmartProxyBrowserState();
}

class _SmartProxyBrowserState extends State<SmartProxyBrowser> {
InAppWebViewController? webViewController;
Timer? _proxyTimer;

// প্রক্সি স্ট্যাটাস
bool isProxyActive = false;
bool hasReloadedForProxy = false;
String? activeProxyDomain;

// নেটওয়ার্ক ট্র্যাকিং
int networkRequestCount = 0;

// Firebase থেকে লোড করা প্রক্সি তথ্য (Webshare gateway)
String proxyHost = ''; // যেমন: [login to view URL]
int proxyPort = 0; // যেমন: 8000
String proxyUsername = '';
String proxyPassword = '';

@override
void initState() {
[login to view URL]();
_loadProxySettingsFromFirebase(); // অ্যাপ শুরুতেই লোড করো
}

// Firebase থেকে প্রক্সি সেটিংস লোড করা
Future<void> _loadProxySettingsFromFirebase() async {
try {
DatabaseReference ref = [login to view URL]("proxy_settings");
DataSnapshot snapshot = await [login to view URL]();

if ([login to view URL]) {
Map<dynamic, dynamic> data = [login to view URL] as Map<dynamic, dynamic>;

setState(() {
proxyHost = data['host'] ?? '';
proxyPort = [login to view URL](data['port'].toString()) ?? 0;
proxyUsername = data['username'] ?? '';
proxyPassword = data['password'] ?? '';
});

print("Proxy settings loaded from Firebase:");
print("Host: $proxyHost:$proxyPort");
print("Username: $proxyUsername");
} else {
print("No proxy settings found in Firebase");
}
} catch (e) {
print("Error loading proxy settings: $e");
}
}

// প্রক্সি গেটওয়ে সেট করা + একবার রিলোড
Future<void> _activateProxyAndReload(WebUri url) async {
if (isProxyActive || hasReloadedForProxy) return;
if ([login to view URL] || proxyPort == 0) {
print("Proxy details not loaded yet!");
return;
}

// Webshare rotating SOCKS5 gateway সেট করো
await [login to view URL]().setProxyOverride(
settings: ProxySettings(
proxyRules: [
ProxyRule(url: "socks5://$proxyHost:$proxyPort"),
],
),
);

setState(() {
isProxyActive = true;
hasReloadedForProxy = true;
activeProxyDomain = [login to view URL];
});

print("Rotating Proxy ACTIVE → New IP assigned → Reloading: ${[login to view URL]}");

// সরাসরি রিলোড – rotating gateway খুব দ্রুত কাজ করে
webViewController?.loadUrl(urlRequest: URLRequest(url: url));
}

// প্রক্সি গেটওয়ে ক্লিয়ার করা (ডোমেইন চেঞ্জ হলে)
Future<void> _resetProxy() async {
await [login to view URL]().clearProxyOverride();
setState(() {
isProxyActive = false;
hasReloadedForProxy = false;
activeProxyDomain = null;
});
print("Proxy gateway CLEARED");
}

@override
Widget build(BuildContext context) {
return InAppWebView(
initialUrlRequest: URLRequest(url: WebUri("[login to view URL]")),
initialOptions: InAppWebViewGroupOptions(
crossPlatform: InAppWebViewOptions(
useOnLoadResource: true, // রিকোয়েস্ট কাউন্টের জন্য জরুরি
),
android: AndroidInAppWebViewOptions(
useHybridComposition: true,
),
),

onWebViewCreated: (controller) {
webViewController = controller;
},

onLoadStart: (controller, url) async {
if (url == null) return;

// নতুন পেজ লোড শুরু → কাউন্ট রিসেট
networkRequestCount = 0;

// ডোমেইন চেঞ্জ হলে প্রক্সি ক্লিয়ার করো
if (isProxyActive && [login to view URL] != activeProxyDomain) {
await _resetProxy();
}

// প্রক্সি ইতিমধ্যে চালু থাকলে → কোনো চেক করার দরকার নেই
if (isProxyActive) return;

// পুরানো টাইমার বাতিল
_proxyTimer?.cancel();
hasReloadedForProxy = false;

// প্রথম চেক: ৫ সেকেন্ড পর
_proxyTimer = Timer(const Duration(seconds: 5), () async {
int bodyLength = await [login to view URL](
source: "[login to view URL] ? [login to view URL]().length : 0;") ??
0;

// লজিক ১: ৫ সেকেন্ডে বডি খালি
if (bodyLength == 0) {
_proxyTimer?.cancel();
await _activateProxyAndReload(url);
return;
}

// শুধু প্রথম চেক ফেল হলে → দ্বিতীয় চেক
_proxyTimer = Timer(const Duration(seconds: 2), () async {
int bodyLength7s = await [login to view URL](
source: "[login to view URL] ? [login to view URL]().length : 0;") ??
0;

// লজিক ২: ৭ সেকেন্ডে HTML < 3KB এবং ≤ ৩টা রিকোয়েস্ট
if (bodyLength7s < 3072 && networkRequestCount <= 3) {
await _activateProxyAndReload(url);
}
});
});
},

onLoadResource: (controller, resource) {
networkRequestCount++;
},

// প্রক্সি অথেনটিকেশন (Webshare-এর জন্য জরুরি)
onReceivedHttpAuthRequest: (controller, challenge) async {
if (isProxyActive && [login to view URL]) {
return HttpAuthResponse(
username: proxyUsername,
password: proxyPassword,
action: [login to view URL],
permanentPersistence: true,
);
}
return HttpAuthResponse(action: [login to view URL]);
},

onLoadStop: (controller, url) {
_proxyTimer?.cancel();
},
);
}

@override
void dispose() {
_proxyTimer?.cancel();
[login to view URL]();
}
}" (client-provided description)


Matched companies (5)

...

TechGigs LLP

We deliver cutting-edge technology solutions to businesses of all sizes. From mobile and web development to AR/VR, AI, and enterprise software, our t… Read more

...

Chirag Solutions

Chirag Solutions is extending its services in website designing & development and software development. Our web and software development is committed… Read more

...

SJ Solutions & Infotech

SJ Solutions & Infotech is a team of highly experienced and dynamic professionals who have an enormous passion for technology. In this fast changing … Read more

...

Junkies Coder

Junkies Coder is a leading technology solution provider across 15 countries and 50+ Rockstar Developers is our strength, We're specializing in web de… Read more

...

Appeonix Creative Lab

At Appeonix Creative Lab, we are more than just an IT company—we are your growth partners. With a passion for innovation and excellence, we craft cus… Read more