A secure, dual-mode web service access system that provides one-time authenticated links via email verification.
DEMO: https://vibecoder-sambruk-u917.vm.elestio.app/demo-domajner/index.html
Hur engΓ₯ngslΓ€nkarna fungerar:
- FΓΆrsta klicket (frΓ₯n e-post):
- LΓ€nken markeras som "anvΓ€nd" i databasen (used: true)
- AnvΓ€ndaren omdirigeras till tjΓ€nsten via proxy/iframe
- Detta fΓΆrhindrar att samma e-postlΓ€nk kan anvΓ€ndas flera gΓ₯nger
- Kopierad lΓ€nk (manuell delning):
- URL:en innehΓ₯ller samma token som fortfarande Γ€r giltig
- Proxy-systemet lΓ₯ter redan "anvΓ€nda" tokens fortsΓ€tta fungera inom sessionen
- SΓ₯ lΓ€nge token inte har gΓ₯tt ut (30 min) fungerar kopierade lΓ€nkar
VarfΓΆr denna design?
SΓ€kerhetsfΓΆrdelar:
- E-post sΓ€kerhet: FΓΆrhindrar Γ₯teranvΓ€ndning om e-post komprometteras
- BegrΓ€nsad spridning: LΓ€nkar kan inte vidarebefordras obegrΓ€nsat via e-post
- TidsbegrΓ€nsning: Alla lΓ€nkar gΓ₯r ut efter 30 minuter oavsett anvΓ€ndning
AnvΓ€ndbarhet:
- Session-fortsΓ€ttning: Samma person kan fortsΓ€tta anvΓ€nda tjΓ€nsten
- Delning: Kan dela aktiv session med kollegor vid behov
- Flexibilitet: Balans mellan sΓ€kerhet och praktisk anvΓ€ndning
- π Proxy Mode: Complete URL anonymity with transparent proxying (FIXED in v1.2.0)
- π Direct Mode: Secure iframe access with complete URL protection
- Email domain verification
- One-time use tokens with 30-minute expiry
- Crypto-secure token generation
- Session-based admin authentication
- Complete URL hiding in both modes (NEW)
- Enhanced iframe security with developer tools protection (NEW)
- Complete proxy implementation with URL rewriting (FIXED in v1.2.0)
- WebSocket proxying for real-time collaboration tools (WORKING in v1.2.0)
- Static resource rewriting for proper proxy functionality
- Responsive admin interface
- Fullscreen support with cross-browser compatibility (NEW in v1.1.0)
- Professional secure access interface (NEW in v1.1.0)
- Docker containerization ready
- Educational institutions controlling access to external tools
- Corporate environments with strict access policies
- Collaborative workspaces needing secure tool access
- Research organizations managing external service access
- Proxy Mode: Excalidraw, Miro, Figma, development tools
- Direct Mode: News sites, social media, commercial platforms
- Node.js 18+
- SMTP server access
- Domain with SSL certificate
- Clone the repository
git clone https://github.com/yourusername/domajner.git
cd domajner- Install dependencies
npm install- Configure environment
cp .env.example .env
# Edit .env with your settings- Start the application
npm start- Access the application
- Main app:
http://localhost:3000 - Admin interface:
http://localhost:3000/admin.html
# SMTP Configuration
SMTP_HOST=172.17.0.1
SMTP_PORT=25
SMTP_SECURE=false
SMTP_AUTH=false
SENDER_EMAIL=your-app@yourdomain.com
# Application Settings
PORT=3000
ADMIN_PASSWORD=your-secure-passwordEdit allowed_domains.txt to specify which email domains are allowed:
company.com
university.edu
organization.org
Configure services in the admin interface or edit services.json:
[
{
"id": "service1",
"name": "Excalidraw",
"url": "https://excalidraw.com",
"description": "Collaborative drawing tool",
"accessMode": "proxy"
},
{
"id": "service2",
"name": "News Site",
"url": "https://example-news.com",
"description": "News and articles",
"accessMode": "direct"
}
]version: '3.8'
services:
domajner:
build: .
ports:
- "3000:3000"
volumes:
- ./data:/app/data
environment:
- SMTP_HOST=your-smtp-host
- SENDER_EMAIL=noreply@yourdomain.com
restart: alwayslocation /domajner/ {
proxy_pass http://localhost:3000/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# WebSocket support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}- Cryptographically secure random tokens
- 30-minute expiration window
- One-time use enforcement
- Automatic cleanup of expired tokens
- Email domain whitelist
- Admin password protection
- Session-based authentication
- Input validation and sanitization
- URL rewriting for complete anonymity
- Headers filtering
- XSS protection
- CSRF protection
GET /- Main application interfaceGET /api/services- List available servicesPOST /api/send-link- Request access linkGET /access/:token- Access service with token
POST /api/admin/login- Admin authenticationGET /api/admin/get-services- Get service configurationPOST /api/admin/set-services- Update servicesGET /api/admin/get-domains- Get allowed domainsPOST /api/admin/set-domains- Update allowed domainsGET /api/admin/get-links- Get active links
domajner/
βββ server.js # Main application server
βββ index.html # User interface
βββ admin.html # Administration interface
βββ package.json # Dependencies
βββ allowed_domains.txt # Email domain whitelist
βββ services.json # Service configuration
βββ one_time_links.json # Active tokens (auto-generated)
βββ docs/ # Documentation
npm run devnpm test- User requests access to a service via email
- System validates email domain against whitelist
- Secure token generated with 30-minute expiry
- Email sent with one-time access link
- User clicks link - token validated and marked as used
- Access granted via chosen mode (proxy/direct)
- User accesses anonymous proxy URL
- System intercepts all requests
- Rewrites URLs and headers
- Forwards to target service
- Returns modified response
- WebSocket connections proxied for real-time features
- User accesses one-time link
- Token validated and marked as used
- Direct redirect to target service
- User interacts directly with service
We welcome contributions! Please see CONTRIBUTING.md for details.
- Follow existing code style
- Add tests for new features
- Update documentation
- Test both access modes
This project is licensed under the MIT License - see the LICENSE file for details.
- Built for secure organizational access control
- Inspired by the need for anonymous service access
- Thanks to the open source community
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: support@yourdomain.com
- OAuth integration
- Multi-language support
- Advanced analytics
- Mobile app
- API rate limiting
- Service health monitoring
Made with β€οΈ for secure organizational tool access