|
1 |
| -# ios_proxy_app |
| 1 | +# π± iOS Proxy-Aware IP Fetcher β Flutter App |
2 | 2 |
|
3 |
| -A new Flutter project. |
| 3 | +A lightweight Flutter application that fetches the deviceβs **public IP address** by leveraging native iOS networking (via `NSURLSession`) that respects **system-level proxies and tunnels** like Safari does. |
4 | 4 |
|
5 |
| -## Getting Started |
| 5 | +--- |
6 | 6 |
|
7 |
| -This project is a starting point for a Flutter application. |
| 7 | +## π§ Purpose |
8 | 8 |
|
9 |
| -A few resources to get you started if this is your first Flutter project: |
| 9 | +This app helps detect the **actual public IP** used by the device β whether it's using a direct internet connection or a tunnel (e.g., VPN, PAC proxy, or local proxy server). Itβs especially useful when you're working in **cloud environments or dynamic networks**. |
10 | 10 |
|
11 |
| -- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) |
12 |
| -- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) |
| 11 | +--- |
13 | 12 |
|
14 |
| -For help getting started with Flutter development, view the |
15 |
| -[online documentation](https://docs.flutter.dev/), which offers tutorials, |
16 |
| -samples, guidance on mobile development, and a full API reference. |
| 13 | +## π§© How It Works |
| 14 | + |
| 15 | +- Flutter UI uses a platform channel to invoke a native Swift method. |
| 16 | +- Native iOS code performs an HTTP request to `https://api.ipify.org`. |
| 17 | +- The request is routed via `URLSession.shared`, which is **proxy-aware**. |
| 18 | +- The public IP returned matches what Safari sees (not just raw device IP). |
| 19 | + |
| 20 | +--- |
| 21 | + |
| 22 | +## π Features |
| 23 | + |
| 24 | +- β
Accurate public IP retrieval via proxy/tunnel |
| 25 | +- β
Respects system-wide proxy config |
| 26 | +- β
Native implementation for high accuracy |
| 27 | +- β
Clean, minimal UI |
| 28 | + |
| 29 | +--- |
| 30 | + |
| 31 | +## π Project Structure |
| 32 | + |
| 33 | +| File | Description | |
| 34 | +|--------------------|------------------------------------------| |
| 35 | +| `main.dart` | Flutter UI and platform channel logic | |
| 36 | +| `AppDelegate.swift`| iOS proxy-aware networking using `NSURLSession` | |
| 37 | +| `exportOptions.plist` | Used for code signing/exporting `.ipa` | |
| 38 | + |
| 39 | +--- |
| 40 | + |
| 41 | +## ποΈ Build & Export `.ipa` |
| 42 | + |
| 43 | +```bash |
| 44 | +# 1. Clean old build |
| 45 | +flutter clean |
| 46 | + |
| 47 | +# 2. Get packages |
| 48 | +flutter pub get |
| 49 | + |
| 50 | +# 3. Build iOS app for release |
| 51 | +flutter build ios --release |
| 52 | + |
| 53 | +# 4. Export a signed .ipa (automatic signing via Xcode settings) |
| 54 | +flutter build ipa --release |
0 commit comments