Skip to content

Commit 16ec4e7

Browse files
committed
updated claude brain.
1 parent ef08599 commit 16ec4e7

File tree

2 files changed

+115
-38
lines changed

2 files changed

+115
-38
lines changed

CLAUDE.md

Lines changed: 89 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,36 @@
22

33
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
44

5+
## App Overview
6+
7+
**Windscribe VPN** is a top-notch VPN application developed by Windscribe Limited, offering comprehensive privacy and security features.
8+
9+
### Key Features
10+
- **Authentication**: SSO login, captcha support, login/signup, account management
11+
- **Email Verification**: Free data allocation upon email confirmation
12+
- **VPN Protocols (6 total)**:
13+
- OpenVPN UDP
14+
- OpenVPN TCP
15+
- IKEv2 (StrongSwan implementation)
16+
- Stealth Protocol (OpenVPN TCP wrapper)
17+
- WSTunnel (OpenVPN TCP WebSocket wrapper)
18+
- WireGuard
19+
- **Per-Network Configuration**: Choose specific protocols and ports for different networks
20+
- **Network Detection**: Requires location permissions (foreground/background) to access network SSID
21+
- **Advanced Features**:
22+
- Split tunneling
23+
- App decoy traffic mode
24+
- Custom sounds
25+
- Custom wallpapers
26+
- Custom names for server locations
27+
- Custom configs (import your own WireGuard or OpenVPN configurations)
28+
- Location favorites
29+
- Newsfeed notifications with promos and news
30+
- IP address display (connected/disconnected state on home screen)
31+
- R.O.B.E.R.T DNS filtering with customizable filter toggles
32+
- Static IP addresses (separate section on home screen, purchasable with pro plans)
33+
34+
535
## Build Commands
636

737
### Building the App
@@ -34,14 +64,38 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
3464
## Project Architecture
3565

3666
### Module Structure
37-
- **base/**: Core VPN logic, database, networking, and shared components
38-
- **mobile/**: Android phone/tablet UI implementation
39-
- **tv/**: Android TV interface implementation
40-
- **openvpn/**: OpenVPN protocol implementation
41-
- **strongswan/**: IKEv2/IPSec protocol implementation
42-
- **wgtunnel/**: WireGuard tunnel implementation
43-
- **common/**: Shared utilities and common code
67+
68+
#### Core Modules
69+
- **base/**: Core functionality hub - exposes managers/repositories, handles state management
70+
- **api/**: Handles all API login and wsnet library interactions
71+
- **apppreference/**: Manages key-value pair preferences and settings
72+
- **backend/**: Handles all VPN functionality and communicates with VPN protocol modules
73+
- **localdatabase/**: Manages structured data using Room (server lists, favorites, etc.)
74+
- **state/**: Handles universal state management (current network info, etc.)
75+
- **repository/**: Communicates with both API and database, exposes data to other components
76+
- **services/**: Android services implementation
77+
- **di/**: Dependency injection setup with Dagger components
78+
- **autoconnection/**: Handles auto-connection mode with protocol fallback and error reporting
79+
- **mobile/**: Phone/tablet UI (99% Jetpack Compose)
80+
- **tv/**: Android TV UI (XML-based layouts)
81+
- **common/**: Tunnel wrapper + DNS traffic separation for custom DNS options
82+
83+
#### VPN Protocol Modules
84+
- **openvpn/**: OpenVPN protocol implementation (built from source)
85+
- **strongswan/**: IKEv2/IPSec implementation with prebuilt binaries
86+
- **strongswan-src/**: Submodule with full source (for custom builds if needed)
87+
- **wgtunnel/**: Go projects compilation module containing:
88+
- WireGuard tunnel implementation
89+
- ctrld CLI for custom DNS (DoH/DoT)
90+
- Stealth Protocol (OpenVPN TCP wrapped in custom tunneling)
91+
- WebSocket Protocol (OpenVPN TCP wrapped in WebSocket traffic)
92+
93+
#### Supporting Modules
94+
- **wsnet/**: In-house networking library (.aar) - handles ALL API communication
4495
- **test/**: Shared test utilities and mocks
96+
- **fastlane/**: CI/CD automation scripts
97+
- **config/**: Build and signing properties (loaded from secret vault during CI/CD)
98+
- **tools/**: Build scripts (e.g., native StrongSwan compilation)
4599

46100
### Application Classes
47101
- **Windscribe** (base): Main application class with dependency injection
@@ -61,6 +115,19 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
61115
- **google**: Google Play Store version with Firebase and billing
62116
- **fdroid**: F-Droid version without proprietary dependencies
63117

118+
#### Build Flavor Differences
119+
- **Google Play Store (google flavor)**:
120+
- Includes payment processing via Google Play Billing
121+
- App review prompts using Google Play In-App Review API
122+
- Push notifications via Firebase Cloud Messaging
123+
- Full feature set with Google APIs integration
124+
125+
- **F-Droid (fdroid flavor)**:
126+
- Missing payment processing (no Google Play Billing)
127+
- No app review prompts (no Google Play In-App Review)
128+
- No push notifications (no Firebase dependency)
129+
- Open-source friendly build without proprietary Google dependencies
130+
64131
## Development Workflow
65132

66133
### Code Style
@@ -81,7 +148,19 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
81148
3. **Server Selection**: Location and server selection logic
82149
4. **User Authentication**: Account management and authentication
83150
5. **Settings**: App preferences and configuration
84-
6. **Auto-Connection**: Background connection management
151+
6. **Auto-Connection**: Intelligent connection management with protocol fallback
152+
- Automatically tries different protocols if one fails
153+
- Provides debug log dialog and support contact when all protocols fail
154+
7. **DNS Routing**:
155+
- Default: DNS queries → VPN's DNS resolver
156+
- Custom DNS enabled: DNS queries → custom DoH/DoT resolver via ctrld
157+
- Common module handles traffic separation
158+
159+
### Architecture Principles
160+
- **Clear Separation**: wsnet (API only) | Protocol modules (VPN logic) | base (orchestration) | UI modules (presentation)
161+
- **Protocol Independence**: Each VPN protocol handles its own connection logic and encryption
162+
- **Centralized State**: Base module provides unified interface for all VPN functionality
163+
- **Modular Compilation**: Go projects compiled into wgtunnel, native binaries prebuilt for StrongSwan
85164

86165
## Common Development Tasks
87166

@@ -97,7 +176,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
97176
- Use existing design patterns and components
98177

99178
### Network/API Changes
100-
- Update Retrofit interfaces in base module
179+
- Update wsnet library integration (API calls go through wsnet, not direct Retrofit)
101180
- Add corresponding data models
102181
- Update database entities if needed
103182

@@ -108,6 +187,4 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
108187

109188
## Security Considerations
110189
- VPN credentials and certificates are stored securely
111-
- Network security config varies by build type
112-
- SSL pinning implemented for API calls
113-
- Proguard/R8 obfuscation enabled for release builds
190+
- Network security config varies by build type

0 commit comments

Comments
 (0)