Nicolas Cantu b096efe072 Fix root cause of SSH connection drops with proper keepalive configuration
**Motivations:**
- SSH connections were being dropped by firewalls/NAT due to insufficient keepalives
- Connection reset by peer errors were occurring because connections were idle too long
- Need to prevent connection drops at the source, not just handle errors after

**Root causes:**
- ServerAliveInterval=60 was too long - many firewalls/NAT close idle connections after 30-45 seconds
- No TCPKeepAlive enabled - missing system-level keepalives
- ControlPersist=300 kept dead connections too long
- ServerAliveCountMax=3 was too lenient for detecting dead connections
- Root cause: connections were being closed by network equipment due to inactivity

**Correctifs:**
- Reduced ServerAliveInterval from 60 to 15 seconds to send keepalives more frequently
- Added TCPKeepAlive=yes to use system-level TCP keepalives
- Reduced ServerAliveCountMax from 3 to 2 to detect dead connections faster
- Reduced ControlPersist from 300 to 60 seconds to avoid keeping dead sockets
- Added Compression=no to reduce overhead
- Removed error detection/retry logic - fixing root cause instead of handling symptoms
- Updated check_ssh_connection() to use same keepalive options for consistency

**Evolutions:**
- Connections now stay alive through firewalls/NAT with frequent keepalives
- Dead connections detected and cleaned up faster
- No more connection reset errors due to proper keepalive configuration

**Pages affectées:**
- deploy.sh: Fixed SSH keepalive configuration to prevent connection drops
2026-01-06 14:42:43 +01:00
2026-01-06 14:33:32 +01:00
2026-01-06 14:17:55 +01:00
2026-01-06 14:24:35 +01:00
2026-01-05 23:37:29 +01:00
2026-01-06 14:17:55 +01:00
2026-01-06 14:41:02 +01:00
2026-01-06 14:17:55 +01:00
2026-01-06 14:17:55 +01:00
2026-01-06 14:17:55 +01:00
2026-01-06 11:30:23 +01:00
2026-01-06 14:17:55 +01:00
2025-12-22 17:56:00 +01:00
2025-12-22 09:48:57 +01:00
2026-01-06 11:30:23 +01:00
2026-01-05 23:14:47 +01:00
2026-01-06 09:26:07 +01:00
2026-01-06 14:17:55 +01:00

zapwall4Science

License: MIT TypeScript Next.js

Plateforme de publication d'articles scientifiques et de science-fiction avec système de sponsoring, commissions et rémunération des avis. Les lecteurs peuvent lire les aperçus gratuitement et débloquer le contenu complet en payant avec Lightning Network.

Repository: https://git.4nkweb.com/4nk/story-research-zapwall

Table of Contents

Features

  • Nostr Authentication: Authenticate using Alby browser extension (NIP-07)
  • Free Previews: Public notes showing article previews
  • Paid Content: Private notes containing full content, unlocked after 800 sats zap
  • Lightning Payments: Integrated Alby/WebLN for Lightning payments (works with Alby and other Lightning wallets)
  • Payment Modal: User-friendly payment interface with invoice display
  • TypeScript: Fully typed codebase

Getting Started

  1. Install dependencies:
npm install
  1. Run the development server:
npm run dev
  1. Open http://localhost:3000 in your browser

Configuration

The application stores all configuration in IndexedDB (browser storage) with hardcoded defaults. No environment variables are required.

Default Configuration

  • Nostr Relay: wss://relay.damus.io (default)
  • NIP-95 Upload API: https://nostr.build/api/v2/upload (default)
  • Platform Lightning Address: Empty by default

Customizing Configuration

Configuration is stored in IndexedDB and can be customized through the application settings. The application supports:

  • Multiple Nostr relays (with priority ordering)
  • Multiple NIP-95 upload APIs (with priority ordering)
  • Platform Lightning address for commissions

All configuration values are stored locally in the browser and persist across sessions. Default values are hardcoded in the application code.

Lightning Wallet Setup

This project uses Alby browser extension for both Nostr authentication and Lightning payments:

  • Alby: Install the Alby browser extension
  • Alby provides both Nostr authentication (NIP-07) and Lightning payments (WebLN)

Users need to have Alby installed to authenticate and make payments. The application will prompt them to connect when needed.

Project Structure

  • /pages: Next.js pages
  • /components: React components
  • /lib: Utilities and Nostr helpers
  • /types: TypeScript type definitions
  • /hooks: Custom React hooks

Déploiement

Documentation complète

La documentation complète du déploiement est disponible dans le dossier docs/ :

Déploiement rapide

Le site est déployé sur zapwall.fr (serveur : 92.243.27.35).

Mise à jour du site :

# Méthode recommandée : Script automatique
./update-remote-git.sh

Vérification du statut :

ssh debian@92.243.27.35 'sudo systemctl status zapwall'

Informations de déploiement

  • Répertoire : /var/www/zapwall.fr
  • Port application : 3001
  • Service systemd : zapwall.service
  • Nginx : Conteneur Docker lecoffre_nginx_test
  • HTTPS : Configuré avec redirection automatique HTTP → HTTPS

Pour plus de détails, consultez la documentation complète.

Contributing

We welcome contributions! Please read our Contributing Guide to get started.

How to Contribute

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes following our coding guidelines
  4. Run lint and type-check (npm run lint && npm run type-check)
  5. Commit your changes (git commit -m 'Add amazing feature')
  6. Push to the branch (git push origin feature/amazing-feature)
  7. Open a Pull Request

Please ensure your code follows our strict quality standards:

  • No fallbacks or silent failures
  • Full TypeScript typing (no any, no ts-ignore)
  • Proper error handling and logging
  • Accessibility compliance (ARIA, keyboard navigation, contrast)

See CONTRIBUTING.md for detailed guidelines.

Documentation

License

This project is licensed under the MIT License - see the LICENSE file for details.

Description
No description provided
Readme MIT 5.3 MiB
Languages
TypeScript 95.9%
JavaScript 3.2%
Shell 0.5%
CSS 0.2%
Python 0.2%