v1.0 Kararlı Sürüm

Hibrit İnternet Erişimi

Gelişmiş gizlilik, güvenlik ve özelleştirme için kendi Internet Gateway'inizi barındırarak tam kontrol sağlayın.

Gelişmiş Teknoloji ile Güçlendirilmiştir

3 İnternet Uplink Yolu

Doğrudan Hücresel / Wi-Fi

Mesh içindeki akıllı telefonlar, aktif hücresel veya Wi-Fi internet bağlantılarını çevrimdışı cihazlarla güvenle paylaşabilir.

Gateway Pro Uplink

Wi-Fi'a bağlı Gateway Pro cihazları, tüm yerel mesh için özel internet köprüleri olarak işlev görebilir.

Ters-Tethering (Reverse-Tethering)

İnternet erişimi olan bir telefon, BLE üzerinden Gateway Lite'a ters bağlantı kurarak, Lite'ın LoRa üzerinden internet erişimi yayınlamasını sağlayabilir.

Neden Kendi Sunucunuz?

Tam Kontrol

Ağ geçidi altyapınız ve veri akışınız üzerinde tam yetki. Kimin bağlanacağına siz karar verin.

Artırılmış Gizlilik

Verileriniz kendi sunucularınızda kalır. Üçüncü şahıslara veya gizli loglamalara yer yoktur.

Özel Yapılandırma

Ağ geçidi ayarlarını, bant genişliği sınırlarını ve yetenekleri özel ihtiyaçlarınıza göre ayarlayın.

Limitsiz Hizmet

Size özel ağ geçidi sayesinde hiçbir kota takılmadan hızın sınırlarını zorlayın.

Bağımsızlık

Operasyonel bağımsızlık. İnternetin diğer bölgeleri çökse bile kendi ağ geçidiniz çalışmaya devam eder.

Sistem Gereksinimleri

İşletim Sistemi
Linux (Ubuntu 22.04+ veya Debian 12+ önerilir)
Web Sunucusu
Nginx 1.22+ veya Apache 2.4+ (Nginx + PHP-FPM önerilir)
PHP
PHP 8.1+ ve şu eklentiler: pdo, pdo_mysql, pdo_sqlite, curl, openssl, mbstring, json, sockets, pcntl
Veritabanı
MySQL 8.0+ veya MariaDB 10.6+ (PostgreSQL de desteklenir)
Güvenlik
Let's Encrypt SSL (ücretsiz) veya ticari SSL sertifikası. Güvenli iletişim için HTTPS zorunludur.
Donanım
Minimum: 1 CPU Çekirdeği, 1GB RAM, 10GB Depolama
Önerilen: 2 CPU Çekirdeği, 2GB RAM, 20GB NVMe Depolama

Dokümantasyon

Step-by-step instructions to deploy your own MOSA Internet Gateway on a Linux server.

1 Understanding the Architecture

The MOSA Messenger does not care what programming language your server uses. Whether you build it in Node.js, Python, Go, or PHP—your gateway merely needs to expose the exact REST API endpoints and accept WebSocket frames in the specific JSON structures defined below.

Language Agnostic REST + WebSockets

2 Implementing the Status API

The first thing the app does is ping your server to verify it's a valid gateway and negotiate the WebSocket endpoint.

app.get('/api/v1/gateway/status', (req, res) => {
  res.json({
    status: 'online',
    version: '1.0',
    capabilities: {
      websocket_enabled: true,
      websocket_url: 'wss://gateway.yourdomain.com/ws'
    }
  });
});

3 Device Registration

When a new device connects, it will hit your `/api/v1/auth/register` endpoint with its Cryptographic Public Key. Your server must generate a unique API Key for that device and return it.

app.post('/api/v1/auth/register', (req, res) => {
  const { device_id, public_key } = req.body;
  const apiKey = generateSecureApiKey(); // e.g., crypto.randomBytes(32)
  
  // Save to Database: [device_id, public_key, apiKey]
  
  res.json({ api_key: apiKey });
});

4 Real-Time WebSocket Server (Node.js Example)

WebSockets are crucial for instant message delivery without draining battery life. Here is a basic implementation using the popular `ws` library in Node.js showing how to authenticate the app's initial payload and handle routing.

server.js
const WebSocket = require('ws');
const wss = new WebSocket.Server({ port: 8080 });

wss.on('connection', function connection(ws) {
  let isAuthenticated = false;
  let deviceId = null;

  ws.on('message', function incoming(data) {
    const payload = JSON.parse(data);

    // 1. Handle Authentication Frame
    if (payload.type === 'auth') {
      const user = verifyTokenInDatabase(payload.token);
      if (user) {
        isAuthenticated = true;
        deviceId = user.device_id;
        ws.send(JSON.stringify({ type: 'auth_success' }));
      } else {
        ws.close();
      }
      return;
    }

    // Require auth for all other frames
    if (!isAuthenticated) return;

    // 2. Handle Message Routing
    if (payload.type === 'message') {
      // Look up recipient's WebSocket connection and forward
      const recipientWs = activeConnections.get(payload.recipient_id);
      if (recipientWs) {
         recipientWs.send(JSON.stringify(payload));
      }
    }
  });
});

5 Handling Media and File Chunks

For files smaller than 5MB, the app will hit `POST /api/v1/files/send`. For larger files, it will utilize `POST /api/v1/files/chunk` to upload the payload in fragments. Voice message streams (`audio_stream`) are pushed directly over the WebSocket.

// File Chunking Logic
app.post('/api/v1/files/chunk', (req, res) => {
  const { message_id, chunk_index, total_chunks, chunk_data, is_last } = req.body;
  
  // Append base64 chunk_data to temp file
  appendChunkToTempFile(message_id, chunk_data);
  
  if (is_last) {
    assembleAndSaveFinalFile(message_id, total_chunks);
  }
  
  res.json({ success: true, chunk_index });
});

Setup Complete!

Your custom Internet Gateway is now successfully running. You can point your MOSA companion applications to https://gateway.yourdomain.com to start routing messages through your own secure infrastructure.

Özel Gateway Uygulama API Spesifikasyonu

MOSA Messenger uygulamasının yerel olarak bağlanabileceği kendi gateway yazılımınızı (ör. Node.js, Python, Go) oluşturun. Sunucunuz aşağıdaki kesin JSON yapılarını ve HTTP imzalarını tam olarak tanımlandığı gibi kabul etmelidir.

Gerekli HTTP Başlıkları (Headers)

Messenger uygulamasından gelen her istek, sunucunuzun belirli başlıkları kabul etmesini ve uygulamasını bekler.

  • Content-Type: application/json
  • Accept: application/json
  • X-MOSA-Timestamp: <unix_timestamp>
  • Authorization: Bearer <API_KEY> (except for status and registration)

1. Gateway Durum API'si

GET

Uygulama sunucu sağlığını kontrol etmek ve WebSocket yeteneklerini belirlemek için bunu çağırır.

GET /api/v1/gateway/status

2. Cihaz Kayıt API'si

POST

Uygulama kriptografik kimliğini kaydeder. Yanıt olarak { "api_key": "YOUR_KEY" } bekler.

{"device_id": "uuid", "public_key": "base64", "capabilities": [...]}

3. Mesaj Gönderme API'si

POST

Uygulama, şifrelenmiş bir mesaj verisini gateway'iniz üzerinden belirli bir alıcıya iletir.

{"message_id": "string", "sender_id": "uuid", "recipient_id": "uuid", "content": "base64", "priority": "int"}

4. Mesaj Yoklama (Polling) API'si

GET

WebSocket bağlantısı başarısız olursa, uygulama bekleyen mesajlar için yoklama yapar.

GET /api/v1/messages/receive/{userId}

Uygulamanın Kullanıcı Kimliğini, veritabanınızdaki bekleyen mesaj kuyruğuyla eşleştirin.

Dosya Transfer API'leri

Uygulama küçük dosyaları tek seferde, 5 MB üzerindeki dosyaları ise parçalara ayırarak gönderir. Medya almak için bu uç noktaları uygulayın.

  • POST POST /api/v1/files/send - Base64'te 'file_data' kullanan 5MB altı dosyalar için.
  • POST POST /api/v1/files/chunk - 'chunk_index', 'total_chunks' ve 'is_last' parametrelerini kullanır.

WebSocket Gerçek Zamanlı Teslimat Protokolü

Uygulama, pil tasarrufu sağlayan gerçek zamanlı teslimat için sunucunuzla sürekli bir WebSocket bağlantısı sürdürür.

Uygulama, 'Gateway Durum' yanıtınızın yetenekler dizisinde 'websocket_url' altında sağlanan URI'ye bağlanır.

A. Kimlik Doğrulama Çerçevesi

Uygulama bir token çerçevesi gönderir. Sunucunuz {"type": "auth_success"} ile yanıt vermelidir.

{"type": "auth", "token": "<API_KEY>"}

B. Gerçek Zamanlı Yönlendirme

Sunucu, gelen mesajları doğrudan alıcı istemci soketine iletir.

{"type": "message", "message_id": "...", "sender_id": "..."}

C. Medya Akışları

Sunucunuz kesintisiz 'audio_stream' parçalarını ve 'video_signal' WebRTC sinyal çerçevelerini iletmelidir.

Kendi sunucunuzu kurmak istemiyor musunuz?

Resmi Internet Gateway'imizi gateway.talivio.com adresinden kullanın. Tam yönetimli, güvenli ve her zaman güncel. Not: gateway oturumları opsiyoneldir (opt-in) ve güvenlik ile gizlilik için 30 dakika sonra otomatik olarak sonlanır.

Yalnızca opt-in — oturumlar 30 dakika sonra otomatik sonlanır.

Daha yüksek bir hız limiti mi gerekiyor? Özel kotalar için [email protected] ile iletişime geçin.

Resmi Gateway'i Kullan