From e126e6ff94f3c51e299a1a0daa400f4ee979e7ca Mon Sep 17 00:00:00 2001 From: ImBenji Date: Mon, 4 Aug 2025 15:38:46 +0100 Subject: [PATCH] Initial commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit πŸ€– Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .env | 3 + .gitignore | 3 + .idea/.gitignore | 3 + .idea/caches/deviceStreaming.xml | 835 ++++++++++++++++++++++++++++++ .idea/libraries/Dart_Packages.xml | 516 ++++++++++++++++++ .idea/libraries/Dart_SDK.xml | 31 ++ .idea/misc.xml | 6 + .idea/modules.xml | 8 + CHANGELOG.md | 3 + Dockerfile | 25 + README.md | 22 + analysis_options.yaml | 30 ++ docker-compose.yml | 17 + lib/main.dart | 90 ++++ lib/supabase_heartbeat.dart | 35 ++ lib/utils.dart | 29 ++ lib/wireguard/peers.dart | 176 +++++++ lib/wireguard/utils.dart | 10 + pubspec.lock | 509 ++++++++++++++++++ pubspec.yaml | 20 + waylume_server.iml | 14 + 21 files changed, 2385 insertions(+) create mode 100644 .env create mode 100644 .gitignore create mode 100644 .idea/.gitignore create mode 100644 .idea/caches/deviceStreaming.xml create mode 100644 .idea/libraries/Dart_Packages.xml create mode 100644 .idea/libraries/Dart_SDK.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 CHANGELOG.md create mode 100644 Dockerfile create mode 100644 README.md create mode 100644 analysis_options.yaml create mode 100644 docker-compose.yml create mode 100644 lib/main.dart create mode 100644 lib/supabase_heartbeat.dart create mode 100644 lib/utils.dart create mode 100644 lib/wireguard/peers.dart create mode 100644 lib/wireguard/utils.dart create mode 100644 pubspec.lock create mode 100644 pubspec.yaml create mode 100644 waylume_server.iml diff --git a/.env b/.env new file mode 100644 index 0000000..50ac1ad --- /dev/null +++ b/.env @@ -0,0 +1,3 @@ +# Server Configuration +SERVER_ID=waylume-server-1 +SUPABASE_KEY=sb_secret_42n-lIvVgivXKXl6_h4uYA_Y7LOXVV1 \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3a85790 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +# https://dart.dev/guides/libraries/private-files +# Created by `dart pub` +.dart_tool/ diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/caches/deviceStreaming.xml b/.idea/caches/deviceStreaming.xml new file mode 100644 index 0000000..9aaec77 --- /dev/null +++ b/.idea/caches/deviceStreaming.xml @@ -0,0 +1,835 @@ + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Dart_Packages.xml b/.idea/libraries/Dart_Packages.xml new file mode 100644 index 0000000..7644605 --- /dev/null +++ b/.idea/libraries/Dart_Packages.xml @@ -0,0 +1,516 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Dart_SDK.xml b/.idea/libraries/Dart_SDK.xml new file mode 100644 index 0000000..ede6037 --- /dev/null +++ b/.idea/libraries/Dart_SDK.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..639900d --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..2a97267 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..effe43c --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,3 @@ +## 1.0.0 + +- Initial version. diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..72238b6 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,25 @@ +FROM dart:3.9.0-100.2.beta + +# Install WireGuard tools for IPC communication +RUN apt-get update && apt-get install -y \ + wireguard-tools \ + iproute2 \ + && rm -rf /var/lib/apt/lists/* + +WORKDIR /app + +# Copy pubspec files first (for dependency caching) +COPY pubspec.yaml pubspec.lock ./ + +# Get dependencies (cached layer) +RUN dart pub get + +# Copy source code (invalidates cache from here) +COPY lib/ ./lib/ + +# Compile the application +RUN dart compile exe lib/waylume_server.dart -o waylume_server + +EXPOSE 3000 51820/udp + +CMD ["./waylume_server"] \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..c200b51 --- /dev/null +++ b/README.md @@ -0,0 +1,22 @@ +# Waylume Server + +## About + +Waylume Server is the backend component of the Waylume premium VPN service. It interfaces with WireGuard to provide secure VPN tunnels and integrates with Supabase for horizontal scalability. The server is designed to be easily deployed with Docker and can be spun up quickly to expand VPN infrastructure. + +The server is written in dart and uses ipc/process.run to interact with WireGuard. It is designed to be lightweight and efficient, making it suitable for deployment on various platforms, including cloud services and local servers. + +## Architecture + +``` +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” +β”‚ Client Apps │───▢│ Supabase │◄───│ Waylume Server β”‚ +β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ + β”‚ + β–Ό + β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” + β”‚ WireGuard β”‚ + β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ +``` + +Client applications communicate exclusively through Supabase, which stores information about available Waylume servers. Each server manages WireGuard connections and registers itself with Supabase for automatic discovery and load distribution. \ No newline at end of file diff --git a/analysis_options.yaml b/analysis_options.yaml new file mode 100644 index 0000000..dee8927 --- /dev/null +++ b/analysis_options.yaml @@ -0,0 +1,30 @@ +# This file configures the static analysis results for your project (errors, +# warnings, and lints). +# +# This enables the 'recommended' set of lints from `package:lints`. +# This set helps identify many issues that may lead to problems when running +# or consuming Dart code, and enforces writing Dart using a single, idiomatic +# style and format. +# +# If you want a smaller set of lints you can change this to specify +# 'package:lints/core.yaml'. These are just the most critical lints +# (the recommended set includes the core lints). +# The core lints are also what is used by pub.dev for scoring packages. + +include: package:lints/recommended.yaml + +# Uncomment the following section to specify additional rules. + +# linter: +# rules: +# - camel_case_types + +# analyzer: +# exclude: +# - path/to/excluded/files/** + +# For more information about the core and recommended set of lints, see +# https://dart.dev/go/core-lints + +# For additional information about configuring this file, see +# https://dart.dev/guides/language/analysis-options diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..1b9b78f --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,17 @@ +version: '3.8' + +services: + waylume-server: + build: + context: . + pull: true + container_name: waylume-server + environment: + - SERVER_ID= + - SUPABASE_KEY= + ports: + - "3000:3000" + - "51820:51820/udp" + volumes: + - /var/run/wireguard:/var/run/wireguard + restart: unless-stopped \ No newline at end of file diff --git a/lib/main.dart b/lib/main.dart new file mode 100644 index 0000000..29fdad6 --- /dev/null +++ b/lib/main.dart @@ -0,0 +1,90 @@ + + +import 'dart:io'; + +import 'package:dotenv/dotenv.dart'; +import 'package:http/http.dart' as http; +import 'package:shelf/shelf.dart'; +import 'package:shelf/shelf_io.dart'; +import 'package:shelf_router/shelf_router.dart'; +import 'package:supabase/supabase.dart'; +import 'package:waylume_server/supabase_heartbeat.dart'; +import 'package:waylume_server/utils.dart'; + +var env = DotEnv()..load(); + +dynamic fromEnivronment(String key) { + if (kIsRunningInDocker) { + return Platform.environment[key]; + } else { + return env[key]; + } +} + +final SupabaseClient SUPABASE_CLIENT = SupabaseClient( + "https://lsdrctuvnwdrzrdyoqzu.supabase.co", + fromEnivronment('SUPABASE_KEY')! +); + + + +void main() async { + + if (kIsRunningInDocker) { + print('Running in Docker environment.'); + } else { + print('Not running in Docker environment.'); + } + + String ip = await getWanIp(); + + // Check if SERVER_ID already exists in the database + var existsCheck = await SUPABASE_CLIENT + .from("waylume_servers") + .select() + .eq("id", fromEnivronment('SERVER_ID')) + .eq("host_ip", ip); + + if (existsCheck.isEmpty) { + await SUPABASE_CLIENT + .from("waylume_servers") + .insert({ + "id": fromEnivronment('SERVER_ID')!, + "last_heartbeat": DateTime.now().toUtc().toIso8601String(), + "host_ip": ip, + }); + } + + // Verify that WireGuard is installed + if (!await isWireguardInstalled()) { + print('WireGuard is not installed. Please install WireGuard to run this server.'); + exit(1); + } else { + print('WireGuard is installed.'); + } + + // Start the heartbeat to keep the server alive + initHeartbeat(); + + // Isolate peers to block traffic between them + if (!Platform.isMacOS) { + await isolatePeers(); + } + + Router app = Router(); + + app.get('/', (request) { + return Response.ok('Welcome to Waylume Server!'); + }); + + var server = await serve(app, '0.0.0.0', 3000); + print('Server running on http://${server.address.host}:${server.port}'); +} + +Future isolatePeers() async { + // Block traffic between peers (peer-to-peer isolation) + await Process.run('iptables', ['-I', 'FORWARD', '-i', 'wg0', '-o', 'wg0', '-j', 'DROP']); + + // Allow established/related connections (for return traffic) + await Process.run('iptables', ['-I', 'FORWARD', '-i', 'wg0', '-o', 'wg0', '-m', 'state', '--state', 'ESTABLISHED,RELATED', '-j', 'ACCEPT']); +} \ No newline at end of file diff --git a/lib/supabase_heartbeat.dart b/lib/supabase_heartbeat.dart new file mode 100644 index 0000000..3f9ac8a --- /dev/null +++ b/lib/supabase_heartbeat.dart @@ -0,0 +1,35 @@ + +// Run a heartbeat to let supabase know that the client is still active. + +import 'dart:io'; +import 'dart:isolate'; +import 'dart:math'; + +import 'package:supabase/supabase.dart'; +import 'package:waylume_server/main.dart'; + +void initHeartbeat() { + + // Run this on a separate thread. + Isolate.spawn((_) async { + + // To avoid server deadlock + await Future.delayed(Duration(seconds: Random().nextInt(5))); + + while (true) { + DateTime now = DateTime.now().toUtc(); + + await SUPABASE_CLIENT + .from("waylume_servers") + .update({ "last_heartbeat": now.toIso8601String() }) + .eq("id", fromEnivronment("SERVER_ID")!); + + print("Heartbeat sent to Supabase at ${now.toIso8601String()}"); + + // Wait 30 seconds before sending the next heartbeat + await Future.delayed(Duration(seconds: 30)); + } + + }, null); + +} \ No newline at end of file diff --git a/lib/utils.dart b/lib/utils.dart new file mode 100644 index 0000000..bb764bc --- /dev/null +++ b/lib/utils.dart @@ -0,0 +1,29 @@ + +import 'dart:convert'; +import 'dart:io'; +import 'package:http/http.dart' as http; + +/// Get the current WAN IP address of the device. +Future getWanIp() async { + // Get the IP address of the server. https://api.ipify.org?format=json + var ipResponse = await http.get(Uri.parse('https://api.ipify.org?format=json')); + if (ipResponse.statusCode == 200) { + var ipData = jsonDecode(ipResponse.body); + return ipData['ip'] as String; + } else { + throw Exception('Failed to get server IP address'); + } +} + +/// Check if Wireguard is installed on the system. +Future isWireguardInstalled() async { + try { + var result = await Process.run('wg', ['--version']); + return result.exitCode == 0; + } catch (e) { + print('Error checking WireGuard installation: $e'); + return false; + } +} + +bool get kIsRunningInDocker => File('/.dockerenv').existsSync(); \ No newline at end of file diff --git a/lib/wireguard/peers.dart b/lib/wireguard/peers.dart new file mode 100644 index 0000000..eaee83c --- /dev/null +++ b/lib/wireguard/peers.dart @@ -0,0 +1,176 @@ + +import 'dart:convert'; +import 'dart:io'; + +import 'package:waylume_server/utils.dart'; +import 'package:waylume_server/wireguard/utils.dart'; + +class WireGuardPeer { + final String privateKey; + final String publicKey; + final String ip; + + WireGuardPeer({ + required this.privateKey, + required this.publicKey, + required this.ip, + }); + + Map toJson() => { + 'privateKey': privateKey, + 'publicKey': publicKey, + 'ip': ip, + }; + + factory WireGuardPeer.fromJson(Map json) => WireGuardPeer( + privateKey: json['privateKey'], + publicKey: json['publicKey'], + ip: json['ip'], + ); + + String generateClientConfig({ + required String serverPublicKey, + required String serverEndpoint, + String dns = '1.1.1.1, 8.8.8.8', // Cloudflare and Google DNS + String allowedIPs = '0.0.0.0/0', + }) { + return ''' +[Interface] +PrivateKey = $privateKey +Address = $ip/32 +DNS = $dns + +[Peer] +PublicKey = $serverPublicKey +Endpoint = $serverEndpoint +AllowedIPs = $allowedIPs +PersistentKeepalive = 25 +'''; + } +} + +Future generateClientConfig(WireGuardPeer peer) async { + + String server_endpoint = '${await getWanIp()}:51820'; // Assuming default WireGuard port + String serverPublicKey = await getServerPublicKey(); + + return peer.generateClientConfig( + serverPublicKey: serverPublicKey, + serverEndpoint: server_endpoint, + ); + +} + +/// Creates a new WireGuard peer and returns the peer info +Future createPeer() async { + // Generate private key + final privateKeyResult = await Process.run('wg', ['genkey']); + final privateKey = privateKeyResult.stdout.toString().trim(); + + // Generate public key from private key + final pubProcess = await Process.start('wg', ['pubkey']); + pubProcess.stdin.writeln(privateKey); + await pubProcess.stdin.close(); + final publicKey = await pubProcess.stdout.transform(utf8.decoder).join(); + + // Get next available IP + final ip = await _getNextIP(); + + // Add peer to WireGuard + await Process.run('wg', ['set', 'wg0', 'peer', publicKey.trim(), 'allowed-ips', '$ip/32']); + + return WireGuardPeer( + privateKey: privateKey, + publicKey: publicKey.trim(), + ip: ip, + ); +} + +Future deletePeer(String publicKey) async { + // Remove peer from WireGuard + final result = await Process.run('wg', ['set', 'wg0', 'peer', publicKey, 'remove']); + if (result.exitCode != 0) { + print('Error removing peer: ${result.stderr}'); + return false; + } + return true; +} + +Future setSpeedLimit(String publicKey, int speedKbps) async { + final peerIP = await _getPeerIP(publicKey); + if (peerIP == null) throw Exception('Peer not found'); + + final mark = _getMarkForIP(peerIP); + + await Process.run('iptables', ['-I', 'FORWARD', '-s', peerIP, '-j', 'MARK', '--set-mark', mark.toString()]); + await Process.run('iptables', ['-I', 'FORWARD', '-d', peerIP, '-j', 'MARK', '--set-mark', mark.toString()]); + await Process.run('tc', ['class', 'add', 'dev', 'wg0', 'parent', '1:1', 'classid', '1:$mark', 'htb', 'rate', '${speedKbps}kbit', 'ceil', '${speedKbps}kbit']); + await Process.run('tc', ['filter', 'add', 'dev', 'wg0', 'protocol', 'ip', 'parent', '1:', 'prio', '1', 'handle', mark.toString(), 'fw', 'flowid', '1:$mark']); +} + +Future setDataCap(String publicKey, int dataCapMB) async { + final peerIP = await _getPeerIP(publicKey); + if (peerIP == null) throw Exception('Peer not found'); + + final quotaBytes = dataCapMB * 1024 * 1024; + await Process.run('iptables', ['-I', 'FORWARD', '-s', peerIP, '-m', 'quota', '--quota', quotaBytes.toString(), '-j', 'ACCEPT']); + await Process.run('iptables', ['-I', 'FORWARD', '-d', peerIP, '-m', 'quota', '--quota', quotaBytes.toString(), '-j', 'ACCEPT']); + await Process.run('iptables', ['-A', 'FORWARD', '-s', peerIP, '-j', 'DROP']); + await Process.run('iptables', ['-A', 'FORWARD', '-d', peerIP, '-j', 'DROP']); +} + +Future _getPeerIP(String publicKey) async { + final result = await Process.run('wg', ['show', 'wg0', 'allowed-ips']); + if (result.exitCode != 0) return null; + + final lines = result.stdout.toString().split('\n'); + for (final line in lines) { + if (line.contains(publicKey)) { + final match = RegExp(r'(\d+\.\d+\.\d+\.\d+)').firstMatch(line); + return match?.group(1); + } + } + return null; +} + +int _getMarkForIP(String ip) { + return ip.split('.').last.hashCode % 65535 + 1; +} + +Future _getNextIP() async { + final result = await Process.run('wg', ['show', 'wg0', 'allowed-ips']); + final usedIPs = RegExp(r'10\.(\d+)\.(\d+)\.(\d+)') + .allMatches(result.stdout.toString()) + .map((m) => '${m.group(1)}.${m.group(2)}.${m.group(3)}') + .toSet(); + + // Start from 10.0.0.2 (skip .1 for server) + for (int a = 0; a <= 255; a++) { + for (int b = 0; b <= 255; b++) { + for (int c = (a == 0 && b == 0 ? 2 : 1); c <= 254; c++) { + final ip = '10.$a.$b.$c'; + if (!usedIPs.contains('$a.$b.$c')) return ip; + } + } + } + throw Exception('No available IPs'); +} + +void main() async { + try { + final peer = await createPeer(); + print('New WireGuard Peer Created:'); + print('Private Key: ${peer.privateKey}'); + print('Public Key: ${peer.publicKey}'); + print('IP Address: ${peer.ip}'); + + // Example usage of generating client config + final clientConfig = peer.generateClientConfig( + serverPublicKey: 'your_server_public_key', + serverEndpoint: 'your_server_endpoint:51820', + ); + print('Client Config:\n$clientConfig'); + } catch (e) { + print('Error creating WireGuard peer: $e'); + } +} \ No newline at end of file diff --git a/lib/wireguard/utils.dart b/lib/wireguard/utils.dart new file mode 100644 index 0000000..a2ea0f3 --- /dev/null +++ b/lib/wireguard/utils.dart @@ -0,0 +1,10 @@ + +import 'dart:io'; + +Future getServerPublicKey() async { + final result = await Process.run('wg', ['show', 'wg0', 'public-key']); + if (result.exitCode != 0) { + throw Exception('Failed to get server public key: ${result.stderr}'); + } + return result.stdout.toString().trim(); +} \ No newline at end of file diff --git a/pubspec.lock b/pubspec.lock new file mode 100644 index 0000000..3cb4840 --- /dev/null +++ b/pubspec.lock @@ -0,0 +1,509 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + sha256: f7bac1065b51df46b2291296e1c1b3616a47aeb735aea46a8ca3dcb7bb700ee7 + url: "https://pub.dev" + source: hosted + version: "86.0.0" + analyzer: + dependency: transitive + description: + name: analyzer + sha256: "4001e2de7c9d125af9504b4c4f64ebba507c9cb9c712caf02ac1d4c37824f58c" + url: "https://pub.dev" + source: hosted + version: "8.0.0" + args: + dependency: "direct main" + description: + name: args + sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04 + url: "https://pub.dev" + source: hosted + version: "2.7.0" + async: + dependency: transitive + description: + name: async + sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb" + url: "https://pub.dev" + source: hosted + version: "2.13.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + cli_config: + dependency: transitive + description: + name: cli_config + sha256: ac20a183a07002b700f0c25e61b7ee46b23c309d76ab7b7640a028f18e4d99ec + url: "https://pub.dev" + source: hosted + version: "0.2.0" + collection: + dependency: transitive + description: + name: collection + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" + url: "https://pub.dev" + source: hosted + version: "1.19.1" + convert: + dependency: transitive + description: + name: convert + sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 + url: "https://pub.dev" + source: hosted + version: "3.1.2" + coverage: + dependency: transitive + description: + name: coverage + sha256: "5da775aa218eaf2151c721b16c01c7676fbfdd99cebba2bf64e8b807a28ff94d" + url: "https://pub.dev" + source: hosted + version: "1.15.0" + crypto: + dependency: transitive + description: + name: crypto + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" + url: "https://pub.dev" + source: hosted + version: "3.0.6" + dotenv: + dependency: "direct main" + description: + name: dotenv + sha256: "379e64b6fc82d3df29461d349a1796ecd2c436c480d4653f3af6872eccbc90e1" + url: "https://pub.dev" + source: hosted + version: "4.2.0" + file: + dependency: transitive + description: + name: file + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 + url: "https://pub.dev" + source: hosted + version: "7.0.1" + frontend_server_client: + dependency: transitive + description: + name: frontend_server_client + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 + url: "https://pub.dev" + source: hosted + version: "4.0.0" + functions_client: + dependency: transitive + description: + name: functions_client + sha256: "91bd57c5ee843957bfee68fdcd7a2e8b3c1081d448e945d33ff695fb9c2a686c" + url: "https://pub.dev" + source: hosted + version: "2.4.3" + glob: + dependency: transitive + description: + name: glob + sha256: c3f1ee72c96f8f78935e18aa8cecced9ab132419e8625dc187e1c2408efc20de + url: "https://pub.dev" + source: hosted + version: "2.1.3" + gotrue: + dependency: transitive + description: + name: gotrue + sha256: "941694654ab659990547798569771d8d092f2ade84a72e75bb9bbca249f3d3b1" + url: "https://pub.dev" + source: hosted + version: "2.13.0" + http: + dependency: "direct main" + description: + name: http + sha256: "2c11f3f94c687ee9bad77c171151672986360b2b001d109814ee7140b2cf261b" + url: "https://pub.dev" + source: hosted + version: "1.4.0" + http_methods: + dependency: transitive + description: + name: http_methods + sha256: "6bccce8f1ec7b5d701e7921dca35e202d425b57e317ba1a37f2638590e29e566" + url: "https://pub.dev" + source: hosted + version: "1.1.1" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + sha256: aa6199f908078bb1c5efb8d8638d4ae191aac11b311132c3ef48ce352fb52ef8 + url: "https://pub.dev" + source: hosted + version: "3.2.2" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571" + url: "https://pub.dev" + source: hosted + version: "4.1.2" + io: + dependency: transitive + description: + name: io + sha256: dfd5a80599cf0165756e3181807ed3e77daf6dd4137caaad72d0b7931597650b + url: "https://pub.dev" + source: hosted + version: "1.0.5" + js: + dependency: transitive + description: + name: js + sha256: "53385261521cc4a0c4658fd0ad07a7d14591cf8fc33abbceae306ddb974888dc" + url: "https://pub.dev" + source: hosted + version: "0.7.2" + jwt_decode: + dependency: transitive + description: + name: jwt_decode + sha256: d2e9f68c052b2225130977429d30f187aa1981d789c76ad104a32243cfdebfbb + url: "https://pub.dev" + source: hosted + version: "0.3.1" + lints: + dependency: "direct dev" + description: + name: lints + sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7 + url: "https://pub.dev" + source: hosted + version: "5.1.1" + logging: + dependency: transitive + description: + name: logging + sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 + url: "https://pub.dev" + source: hosted + version: "1.3.0" + matcher: + dependency: transitive + description: + name: matcher + sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 + url: "https://pub.dev" + source: hosted + version: "0.12.17" + meta: + dependency: transitive + description: + name: meta + sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394" + url: "https://pub.dev" + source: hosted + version: "1.17.0" + mime: + dependency: transitive + description: + name: mime + sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6" + url: "https://pub.dev" + source: hosted + version: "2.0.0" + node_preamble: + dependency: transitive + description: + name: node_preamble + sha256: "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db" + url: "https://pub.dev" + source: hosted + version: "2.0.2" + package_config: + dependency: transitive + description: + name: package_config + sha256: f096c55ebb7deb7e384101542bfba8c52696c1b56fca2eb62827989ef2353bbc + url: "https://pub.dev" + source: hosted + version: "2.2.0" + path: + dependency: transitive + description: + name: path + sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" + url: "https://pub.dev" + source: hosted + version: "1.9.1" + pool: + dependency: transitive + description: + name: pool + sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" + url: "https://pub.dev" + source: hosted + version: "1.5.1" + postgrest: + dependency: transitive + description: + name: postgrest + sha256: "10b81a23b1c829ccadf68c626b4d66666453a1474d24c563f313f5ca7851d575" + url: "https://pub.dev" + source: hosted + version: "2.4.2" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "5bfcf68ca79ef689f8990d1160781b4bad40a3bd5e5218ad4076ddb7f4081585" + url: "https://pub.dev" + source: hosted + version: "2.2.0" + realtime_client: + dependency: transitive + description: + name: realtime_client + sha256: b6a825a4c80f2281ebfbbcf436a8979ae9993d4a30dbcf011b7d2b82ddde9edd + url: "https://pub.dev" + source: hosted + version: "2.5.1" + retry: + dependency: transitive + description: + name: retry + sha256: "822e118d5b3aafed083109c72d5f484c6dc66707885e07c0fbcb8b986bba7efc" + url: "https://pub.dev" + source: hosted + version: "3.1.2" + rxdart: + dependency: transitive + description: + name: rxdart + sha256: "5c3004a4a8dbb94bd4bf5412a4def4acdaa12e12f269737a5751369e12d1a962" + url: "https://pub.dev" + source: hosted + version: "0.28.0" + shelf: + dependency: "direct main" + description: + name: shelf + sha256: e7dd780a7ffb623c57850b33f43309312fc863fb6aa3d276a754bb299839ef12 + url: "https://pub.dev" + source: hosted + version: "1.4.2" + shelf_packages_handler: + dependency: transitive + description: + name: shelf_packages_handler + sha256: "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e" + url: "https://pub.dev" + source: hosted + version: "3.0.2" + shelf_router: + dependency: "direct main" + description: + name: shelf_router + sha256: f5e5d492440a7fb165fe1e2e1a623f31f734d3370900070b2b1e0d0428d59864 + url: "https://pub.dev" + source: hosted + version: "1.1.4" + shelf_static: + dependency: transitive + description: + name: shelf_static + sha256: c87c3875f91262785dade62d135760c2c69cb217ac759485334c5857ad89f6e3 + url: "https://pub.dev" + source: hosted + version: "1.1.3" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + sha256: "3632775c8e90d6c9712f883e633716432a27758216dfb61bd86a8321c0580925" + url: "https://pub.dev" + source: hosted + version: "3.0.0" + source_map_stack_trace: + dependency: transitive + description: + name: source_map_stack_trace + sha256: c0713a43e323c3302c2abe2a1cc89aa057a387101ebd280371d6a6c9fa68516b + url: "https://pub.dev" + source: hosted + version: "2.1.2" + source_maps: + dependency: transitive + description: + name: source_maps + sha256: "190222579a448b03896e0ca6eca5998fa810fda630c1d65e2f78b3f638f54812" + url: "https://pub.dev" + source: hosted + version: "0.10.13" + source_span: + dependency: transitive + description: + name: source_span + sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" + url: "https://pub.dev" + source: hosted + version: "1.10.1" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" + url: "https://pub.dev" + source: hosted + version: "1.12.1" + storage_client: + dependency: transitive + description: + name: storage_client + sha256: "09bac4d75eea58e8113ca928e6655a09cc8059e6d1b472ee801f01fde815bcfc" + url: "https://pub.dev" + source: hosted + version: "2.4.0" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" + url: "https://pub.dev" + source: hosted + version: "1.4.1" + supabase: + dependency: "direct main" + description: + name: supabase + sha256: "56c3493114caac8ef0dc3cac5fa24a9edefeb8c22d45794814c0fe3d2feb1a98" + url: "https://pub.dev" + source: hosted + version: "2.8.0" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" + url: "https://pub.dev" + source: hosted + version: "1.2.2" + test: + dependency: "direct dev" + description: + name: test + sha256: "75906bf273541b676716d1ca7627a17e4c4070a3a16272b7a3dc7da3b9f3f6b7" + url: "https://pub.dev" + source: hosted + version: "1.26.3" + test_api: + dependency: transitive + description: + name: test_api + sha256: ab2726c1a94d3176a45960b6234466ec367179b87dd74f1611adb1f3b5fb9d55 + url: "https://pub.dev" + source: hosted + version: "0.7.7" + test_core: + dependency: transitive + description: + name: test_core + sha256: "0cc24b5ff94b38d2ae73e1eb43cc302b77964fbf67abad1e296025b78deb53d0" + url: "https://pub.dev" + source: hosted + version: "0.6.12" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 + url: "https://pub.dev" + source: hosted + version: "1.4.0" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "45caa6c5917fa127b5dbcfbd1fa60b14e583afdc08bfc96dda38886ca252eb60" + url: "https://pub.dev" + source: hosted + version: "15.0.2" + watcher: + dependency: transitive + description: + name: watcher + sha256: "0b7fd4a0bbc4b92641dbf20adfd7e3fd1398fe17102d94b674234563e110088a" + url: "https://pub.dev" + source: hosted + version: "1.1.2" + web: + dependency: transitive + description: + name: web + sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a" + url: "https://pub.dev" + source: hosted + version: "1.1.1" + web_socket: + dependency: transitive + description: + name: web_socket + sha256: "34d64019aa8e36bf9842ac014bb5d2f5586ca73df5e4d9bf5c936975cae6982c" + url: "https://pub.dev" + source: hosted + version: "1.0.1" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + sha256: d645757fb0f4773d602444000a8131ff5d48c9e47adfe9772652dd1a4f2d45c8 + url: "https://pub.dev" + source: hosted + version: "3.0.3" + webkit_inspection_protocol: + dependency: transitive + description: + name: webkit_inspection_protocol + sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572" + url: "https://pub.dev" + source: hosted + version: "1.2.1" + yaml: + dependency: transitive + description: + name: yaml + sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce + url: "https://pub.dev" + source: hosted + version: "3.1.3" + yet_another_json_isolate: + dependency: transitive + description: + name: yet_another_json_isolate + sha256: fe45897501fa156ccefbfb9359c9462ce5dec092f05e8a56109db30be864f01e + url: "https://pub.dev" + source: hosted + version: "2.1.0" +sdks: + dart: ">=3.9.0-100.2.beta <4.0.0" diff --git a/pubspec.yaml b/pubspec.yaml new file mode 100644 index 0000000..b2adae7 --- /dev/null +++ b/pubspec.yaml @@ -0,0 +1,20 @@ +name: waylume_server +description: A sample command-line application with basic argument parsing. +version: 0.0.1 +# repository: https://github.com/my_org/my_repo + +environment: + sdk: ^3.9.0-100.2.beta + +# Add regular dependencies here. +dependencies: + args: ^2.5.0 + shelf: ^1.4.2 + shelf_router: ^1.1.4 + supabase: ^2.8.0 + dotenv: ^4.2.0 + http: ^1.4.0 + +dev_dependencies: + lints: ^5.0.0 + test: ^1.24.0 diff --git a/waylume_server.iml b/waylume_server.iml new file mode 100644 index 0000000..75734c9 --- /dev/null +++ b/waylume_server.iml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file