Spaces:
Running
Running
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Ubuntu Network Manager</title> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | |
| <style> | |
| :root { | |
| --bg-primary: #1e1e1e; | |
| --bg-secondary: #2d2d2d; | |
| --bg-tertiary: #3d3d3d; | |
| --accent: #E95420; | |
| --accent-hover: #ff6b35; | |
| --text-primary: #ffffff; | |
| --text-secondary: #b0b0b0; | |
| --success: #4caf50; | |
| --warning: #ff9800; | |
| --danger: #f44336; | |
| --border-color: #404040; | |
| } | |
| * { | |
| margin: 0; | |
| padding: 0; | |
| box-sizing: border-box; | |
| } | |
| body { | |
| font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif; | |
| background: var(--bg-primary); | |
| color: var(--text-primary); | |
| min-height: 100vh; | |
| overflow-x: hidden; | |
| } | |
| /* Header */ | |
| .header { | |
| background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%); | |
| padding: 15px 30px; | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| border-bottom: 1px solid var(--border-color); | |
| position: sticky; | |
| top: 0; | |
| z-index: 100; | |
| box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); | |
| } | |
| .logo-section { | |
| display: flex; | |
| align-items: center; | |
| gap: 15px; | |
| } | |
| .ubuntu-logo { | |
| width: 45px; | |
| height: 45px; | |
| background: var(--accent); | |
| border-radius: 12px; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| font-size: 24px; | |
| font-weight: bold; | |
| color: white; | |
| box-shadow: 0 4px 10px rgba(233, 84, 32, 0.4); | |
| } | |
| .app-title h1 { | |
| font-size: 1.4rem; | |
| font-weight: 600; | |
| } | |
| .app-title span { | |
| font-size: 0.8rem; | |
| color: var(--text-secondary); | |
| } | |
| .header-actions { | |
| display: flex; | |
| align-items: center; | |
| gap: 20px; | |
| } | |
| .status-indicator { | |
| display: flex; | |
| align-items: center; | |
| gap: 8px; | |
| padding: 8px 16px; | |
| background: rgba(76, 175, 80, 0.15); | |
| border-radius: 20px; | |
| border: 1px solid rgba(76, 175, 80, 0.3); | |
| } | |
| .status-dot { | |
| width: 10px; | |
| height: 10px; | |
| background: var(--success); | |
| border-radius: 50%; | |
| animation: pulse 2s infinite; | |
| } | |
| @keyframes pulse { | |
| 0%, 100% { opacity: 1; transform: scale(1); } | |
| 50% { opacity: 0.7; transform: scale(1.1); } | |
| } | |
| .anycoder-link { | |
| color: var(--text-secondary); | |
| text-decoration: none; | |
| font-size: 0.85rem; | |
| padding: 6px 12px; | |
| border-radius: 6px; | |
| transition: all 0.3s ease; | |
| border: 1px solid transparent; | |
| } | |
| .anycoder-link:hover { | |
| color: var(--accent); | |
| border-color: var(--accent); | |
| background: rgba(233, 84, 32, 0.1); | |
| } | |
| /* Main Container */ | |
| .main-container { | |
| display: flex; | |
| min-height: calc(100vh - 80px); | |
| } | |
| /* Sidebar */ | |
| .sidebar { | |
| width: 250px; | |
| background: var(--bg-secondary); | |
| padding: 20px 0; | |
| border-right: 1px solid var(--border-color); | |
| } | |
| .nav-item { | |
| display: flex; | |
| align-items: center; | |
| gap: 12px; | |
| padding: 14px 25px; | |
| cursor: pointer; | |
| transition: all 0.3s ease; | |
| border-left: 3px solid transparent; | |
| color: var(--text-secondary); | |
| } | |
| .nav-item:hover { | |
| background: rgba(255, 255, 255, 0.05); | |
| color: var(--text-primary); | |
| } | |
| .nav-item.active { | |
| background: rgba(233, 84, 32, 0.1); | |
| border-left-color: var(--accent); | |
| color: var(--accent); | |
| } | |
| .nav-item i { | |
| width: 24px; | |
| text-align: center; | |
| } | |
| /* Content Area */ | |
| .content { | |
| flex: 1; | |
| padding: 30px; | |
| overflow-y: auto; | |
| } | |
| .page { | |
| display: none; | |
| animation: fadeIn 0.4s ease; | |
| } | |
| .page.active { | |
| display: block; | |
| } | |
| @keyframes fadeIn { | |
| from { opacity: 0; transform: translateY(10px); } | |
| to { opacity: 1; transform: translateY(0); } | |
| } | |
| .page-title { | |
| font-size: 1.8rem; | |
| margin-bottom: 10px; | |
| } | |
| .page-subtitle { | |
| color: var(--text-secondary); | |
| margin-bottom: 25px; | |
| } | |
| /* Cards */ | |
| .card { | |
| background: var(--bg-secondary); | |
| border-radius: 16px; | |
| padding: 20px; | |
| margin-bottom: 20px; | |
| border: 1px solid var(--border-color); | |
| transition: all 0.3s ease; | |
| } | |
| .card:hover { | |
| transform: translateY(-2px); | |
| box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2); | |
| } | |
| .card-header { | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| margin-bottom: 15px; | |
| } | |
| .card-title { | |
| font-size: 1.1rem; | |
| font-weight: 600; | |
| } | |
| /* Connection Status Card */ | |
| .connection-overview { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); | |
| gap: 20px; | |
| margin-bottom: 30px; | |
| } | |
| .status-card { | |
| background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%); | |
| border-radius: 16px; | |
| padding: 25px; | |
| border: 1px solid var(--border-color); | |
| position: relative; | |
| overflow: hidden; | |
| } | |
| .status-card::before { | |
| content: ''; | |
| position: absolute; | |
| top: 0; | |
| left: 0; | |
| right: 0; | |
| height: 4px; | |
| background: var(--accent); | |
| } | |
| .status-card.connected::before { | |
| background: var(--success); | |
| } | |
| .status-card.disconnected::before { | |
| background: var(--danger); | |
| } | |
| .status-icon { | |
| width: 60px; | |
| height: 60px; | |
| border-radius: 14px; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| font-size: 28px; | |
| margin-bottom: 15px; | |
| } | |
| .status-card.wifi .status-icon { | |
| background: rgba(33, 150, 243, 0.15); | |
| color: #2196f3; | |
| } | |
| .status-card.ethernet .status-icon { | |
| background: rgba(76, 175, 80, 0.15); | |
| color: #4caf50; | |
| } | |
| .status-card.vpn .status-icon { | |
| background: rgba(156, 39, 176, 0.15); | |
| color: #9c27b0; | |
| } | |
| .status-info h3 { | |
| font-size: 1.2rem; | |
| margin-bottom: 5px; | |
| } | |
| .status-info p { | |
| color: var(--text-secondary); | |
| font-size: 0.9rem; | |
| margin-bottom: 15px; | |
| } | |
| /* Buttons */ | |
| .btn { | |
| padding: 10px 20px; | |
| border: none; | |
| border-radius: 8px; | |
| cursor: pointer; | |
| font-size: 0.9rem; | |
| font-weight: 500; | |
| transition: all 0.3s ease; | |
| display: inline-flex; | |
| align-items: center; | |
| gap: 8px; | |
| } | |
| .btn-primary { | |
| background: var(--accent); | |
| color: white; | |
| } | |
| .btn-primary:hover { | |
| background: var(--accent-hover); | |
| transform: translateY(-2px); | |
| box-shadow: 0 4px 15px rgba(233, 84, 32, 0.4); | |
| } | |
| .btn-secondary { | |
| background: var(--bg-tertiary); | |
| color: var(--text-primary); | |
| border: 1px solid var(--border-color); | |
| } | |
| .btn-secondary:hover { | |
| background: var(--border-color); | |
| } | |
| .btn-danger { | |
| background: rgba(244, 67, 54, 0.15); | |
| color: var(--danger); | |
| border: 1px solid rgba(244, 67, 54, 0.3); | |
| } | |
| .btn-danger:hover { | |
| background: var(--danger); | |
| color: white; | |
| } | |
| .btn-sm { | |
| padding: 6px 12px; | |
| font-size: 0.8rem; | |
| } | |
| /* WiFi Networks List */ | |
| .network-list { | |
| display: flex; | |
| flex-direction: column; | |
| gap: 10px; | |
| } | |
| .network-item { | |
| display: flex; | |
| align-items: center; | |
| justify-content: space-between; | |
| padding: 15px 20px; | |
| background: var(--bg-tertiary); | |
| border-radius: 12px; | |
| cursor: pointer; | |
| transition: all 0.3s ease; | |
| border: 1px solid transparent; | |
| } | |
| .network-item:hover { | |
| border-color: var(--accent); | |
| transform: translateX(5px); | |
| } | |
| .network-item.connected { | |
| border-color: var(--success); | |
| background: rgba(76, 175, 80, 0.1); | |
| } | |
| .network-left { | |
| display: flex; | |
| align-items: center; | |
| gap: 15px; | |
| } | |
| .network-icon { | |
| width: 45px; | |
| height: 45px; | |
| border-radius: 10px; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| font-size: 22px; | |
| } | |
| .network-icon.secure { | |
| background: rgba(33, 150, 243, 0.15); | |
| color: #2196f3; | |
| } | |
| .network-icon.open { | |
| background: rgba(76, 175, 80, 0.15); | |
| color: #4caf50; | |
| } | |
| .network-details h4 { | |
| font-size: 1rem; | |
| margin-bottom: 4px; | |
| } | |
| .network-details span { | |
| font-size: 0.8rem; | |
| color: var(--text-secondary); | |
| } | |
| .signal-strength { | |
| display: flex; | |
| flex-direction: column; | |
| align-items: flex-end; | |
| gap: 5px; | |
| } | |
| .signal-bars { | |
| display: flex; | |
| gap: 3px; | |
| align-items: flex-end; | |
| height: 20px; | |
| } | |
| .signal-bar { | |
| width: 4px; | |
| background: var(--border-color); | |
| border-radius: 2px; | |
| transition: all 0.3s ease; | |
| } | |
| .signal-bar.active { | |
| background: var(--accent); | |
| } | |
| .signal-bar:nth-child(1) { height: 6px; } | |
| .signal-bar:nth-child(2) { height: 10px; } | |
| .signal-bar:nth-child(3) { height: 14px; } | |
| .signal-bar:nth-child(4) { height: 18px; } | |
| .network-item.connected .signal-bar.active { | |
| background: var(--success); | |
| } | |
| /* Ethernet Section */ | |
| .ethernet-info { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); | |
| gap: 15px; | |
| } | |
| .info-item { | |
| background: var(--bg-tertiary); | |
| padding: 15px; | |
| border-radius: 10px; | |
| } | |
| .info-item label { | |
| display: block; | |
| font-size: 0.8rem; | |
| color: var(--text-secondary); | |
| margin-bottom: 5px; | |
| } | |
| .info-item span { | |
| font-size: 0.95rem; | |
| word-break: break-all; | |
| } | |
| /* VPN Section */ | |
| .vpn-list { | |
| display: flex; | |
| flex-direction: column; | |
| gap: 12px; | |
| } | |
| .vpn-item { | |
| display: flex; | |
| align-items: center; | |
| justify-content: space-between; | |
| padding: 18px 20px; | |
| background: var(--bg-tertiary); | |
| border-radius: 12px; | |
| border: 1px solid transparent; | |
| transition: all 0.3s ease; | |
| } | |
| .vpn-item:hover { | |
| border-color: #9c27b0; | |
| } | |
| .vpn-item.active { | |
| border-color: var(--success); | |
| background: rgba(76, 175, 80, 0.1); | |
| } | |
| .vpn-left { | |
| display: flex; | |
| align-items: center; | |
| gap: 15px; | |
| } | |
| .vpn-icon { | |
| width: 50px; | |
| height: 50px; | |
| background: rgba(156, 39, 176, 0.15); | |
| border-radius: 12px; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| font-size: 24px; | |
| color: #9c27b0; | |
| } | |
| .toggle-switch { | |
| position: relative; | |
| width: 52px; | |
| height: 28px; | |
| } | |
| .toggle-switch input { | |
| opacity: 0; | |
| width: 0; | |
| height: 0; | |
| } | |
| .toggle-slider { | |
| position: absolute; | |
| cursor: pointer; | |
| top: 0; | |
| left: 0; | |
| right: 0; | |
| bottom: 0; | |
| background: var(--bg-primary); | |
| border-radius: 28px; | |
| transition: all 0.3s ease; | |
| border: 1px solid var(--border-color); | |
| } | |
| .toggle-slider::before { | |
| content: ''; | |
| position: absolute; | |
| height: 22px; | |
| width: 22px; | |
| left: 2px; | |
| bottom: 2px; | |
| background: white; | |
| border-radius: 50%; | |
| transition: all 0.3s ease; | |
| } | |
| .toggle-switch input:checked + .toggle-slider { | |
| background: var(--success); | |
| border-color: var(--success); | |
| } | |
| .toggle-switch input:checked + .toggle-slider::before { | |
| transform: translateX(24px); | |
| } | |
| /* Modal */ | |
| .modal-overlay { | |
| position: fixed; | |
| top: 0; | |
| left: 0; | |
| right: 0; | |
| bottom: 0; | |
| background: rgba(0, 0, 0, 0.7); | |
| display: none; | |
| align-items: center; | |
| justify-content: center; | |
| z-index: 1000; | |
| backdrop-filter: blur(5px); | |
| } | |
| .modal-overlay.active { | |
| display: flex; | |
| } | |
| .modal { | |
| background: var(--bg-secondary); | |
| border-radius: 20px; | |
| padding: 30px; | |
| width: 90%; | |
| max-width: 500px; | |
| border: 1px solid var(--border-color); | |
| animation: modalSlide 0.3s ease; | |
| } | |
| @keyframes modalSlide { | |
| from { opacity: 0; transform: scale(0.9) translateY(-20px); } | |
| to { opacity: 1; transform: scale(1) translateY(0); } | |
| } | |
| .modal-header { | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| margin-bottom: 25px; | |
| } | |
| .modal-header h2 { | |
| font-size: 1.4rem; | |
| } | |
| .modal-close { | |
| width: 36px; | |
| height: 36px; | |
| border-radius: 50%; | |
| background: var(--bg-tertiary); | |
| border: none; | |
| color: var(--text-secondary); | |
| cursor: pointer; | |
| transition: all 0.3s ease; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| } | |
| .modal-close:hover { | |
| background: var(--danger); | |
| color: white; | |
| } | |
| .form-group { | |
| margin-bottom: 20px; | |
| } | |
| .form-group label { | |
| display: block; | |
| margin-bottom: 8px; | |
| font-size: 0.9rem; | |
| color: var(--text-secondary); | |
| } | |
| .form-group input, | |
| .form-group select { | |
| width: 100%; | |
| padding: 12px 16px; | |
| background: var(--bg-tertiary); | |
| border: 1px solid var(--border-color); | |
| border-radius: 10px; | |
| color: var(--text-primary); | |
| font-size: 1rem; | |
| transition: all 0.3s ease; | |
| } | |
| .form-group input:focus, | |
| .form-group select:focus { | |
| outline: none; | |
| border-color: var(--accent); | |
| box-shadow: 0 0 0 3px rgba(233, 84, 32, 0.2); | |
| } | |
| .modal-actions { | |
| display: flex; | |
| gap: 12px; | |
| justify-content: flex-end; | |
| margin-top: 25px; | |
| } | |
| /* Quick Actions */ | |
| .quick-actions { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); | |
| gap: 15px; | |
| margin-bottom: 30px; | |
| } | |
| .action-card { | |
| background: var(--bg-secondary); | |
| border-radius: 12px; | |
| padding: 20px; | |
| text-align: center; | |
| cursor: pointer; | |
| border: 1px solid var(--border-color); | |
| transition: all 0.3s ease; | |
| } | |
| .action-card:hover { | |
| border-color: var(--accent); | |
| transform: translateY(-3px); | |
| box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2); | |
| } | |
| .action-card i { | |
| font-size: 28px; | |
| color: var(--accent); | |
| margin-bottom: 10px; | |
| } | |
| .action-card h4 { | |
| font-size: 0.95rem; | |
| margin-bottom: 5px; | |
| } | |
| .action-card p { | |
| font-size: 0.8rem; | |
| color: var(--text-secondary); | |
| } | |
| /* Toast Notifications */ | |
| .toast-container { | |
| position: fixed; | |
| bottom: 30px; | |
| right: 30px; | |
| z-index: 2000; | |
| display: flex; | |
| flex-direction: column; | |
| gap: 10px; | |
| } | |
| .toast { | |
| background: var(--bg-secondary); | |
| border-radius: 12px; | |
| padding: 16px 20px; | |
| display: flex; | |
| align-items: center; | |
| gap: 12px; | |
| min-width: 300px; | |
| border: 1px solid var(--border-color); | |
| animation: toastSlide 0.4s ease; | |
| box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3); | |
| } | |
| @keyframes toastSlide { | |
| from { opacity: 0; transform: translateX(100px); } | |
| to { opacity: 1; transform: translateX(0); } | |
| } | |
| .toast.success { | |
| border-left: 4px solid var(--success); | |
| } | |
| .toast.error { | |
| border-left: 4px solid var(--danger); | |
| } | |
| .toast.info { | |
| border-left: 4px solid #2196f3; | |
| } | |
| .toast-icon { | |
| font-size: 20px; | |
| } | |
| .toast.success .toast-icon { color: var(--success); } | |
| .toast.error .toast-icon { color: var(--danger); } | |
| .toast.info .toast-icon { color: #2196f3; } | |
| /* Progress Ring */ | |
| .loading-overlay { | |
| position: fixed; | |
| top: 0; | |
| left: 0; | |
| right: 0; | |
| bottom: 0; | |
| background: rgba(0, 0, 0, 0.8); | |
| display: none; | |
| align-items: center; | |
| justify-content: center; | |
| z-index: 3000; | |
| } | |
| .loading-overlay.active { | |
| display: flex; | |
| } | |
| .loader { | |
| width: 60px; | |
| height: 60px; | |
| border: 4px solid var(--bg-tertiary); | |
| border-top-color: var(--accent); | |
| border-radius: 50%; | |
| animation: spin 1s linear infinite; | |
| } | |
| @keyframes spin { | |
| to { transform: rotate(360deg); } | |
| } | |
| /* Responsive */ | |
| @media (max-width: 768px) { | |
| .sidebar { | |
| display: none; | |
| } | |
| .header { | |
| padding: 12px 20px; | |
| } | |
| .content { | |
| padding: 20px; | |
| } | |
| .anycoder-link { | |
| display: none; | |
| } | |
| .connection-overview { | |
| grid-template-columns: 1fr; | |
| } | |
| } | |
| /* Terminal Simulation */ | |
| .terminal { | |
| background: #0d0d0d; | |
| border-radius: 12px; | |
| padding: 20px; | |
| font-family: 'Courier New', monospace; | |
| margin-top: 20px; | |
| max-height: 300px; | |
| overflow-y: auto; | |
| } | |
| .terminal-line { | |
| margin-bottom: 5px; | |
| font-size: 0.9rem; | |
| } | |
| .terminal-line .prompt { | |
| color: #4caf50; | |
| } | |
| .terminal-line .command { | |
| color: #2196f3; | |
| } | |
| .terminal-line .output { | |
| color: var(--text-secondary); | |
| } | |
| /* Scrollbar */ | |
| ::-webkit-scrollbar { | |
| width: 8px; | |
| } | |
| ::-webkit-scrollbar-track { | |
| background: var(--bg-primary); | |
| } | |
| ::-webkit-scrollbar-thumb { | |
| background: var(--border-color); | |
| border-radius: 4px; | |
| } | |
| ::-webkit-scrollbar-thumb:hover { | |
| background: var(--text-secondary); | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <!-- Header --> | |
| <header class="header"> | |
| <div class="logo-section"> | |
| <div class="ubuntu-logo"> | |
| <i class="fab fa-ubuntu"></i> | |
| </div> | |
| <div class="app-title"> | |
| <h1>Network Manager</h1> | |
| <span>Ubuntu Connection Manager</span> | |
| </div> | |
| </div> | |
| <div class="header-actions"> | |
| <div class="status-indicator"> | |
| <div class="status-dot"></div> | |
| <span>System Online</span> | |
| </div> | |
| <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="anycoder-link"> | |
| Built with anycoder | |
| </a> | |
| </div> | |
| </header> | |
| <!-- Main Container --> | |
| <div class="main-container"> | |
| <!-- Sidebar --> | |
| <nav class="sidebar"> | |
| <div class="nav-item active" data-page="overview"> | |
| <i class="fas fa-home"></i> | |
| <span>Overview</span> | |
| </div> | |
| <div class="nav-item" data-page="wifi"> | |
| <i class="fas fa-wifi"></i> | |
| <span>WiFi Networks</span> | |
| </div> | |
| <div class="nav-item" data-page="ethernet"> | |
| <i class="fas fa-ethernet"></i> | |
| <span>Ethernet</span> | |
| </div> | |
| <div class="nav-item" data-page="vpn"> | |
| <i class="fas fa-shield-alt"></i> | |
| <span>VPN Connections</span> | |
| </div> | |
| <div class="nav-item" data-page="hotspot"> | |
| <i class="fas fa-wifi"></i> | |
| <span>Hotspot</span> | |
| </div> | |
| <div class="nav-item" data-page="terminal"> | |
| <i class="fas fa-terminal"></i> | |
| <span>Network Tools</span> | |
| </div> | |
| </nav> | |
| <!-- Content Area --> | |
| <main class="content"> | |
| <!-- Overview Page --> | |
| <div class="page active" id="overview"> | |
| <h2 class="page-title">Network Overview</h2> | |
| <p class="page-subtitle">Monitor and manage your network connections</p> | |
| <div class="connection-overview"> | |
| <div class="status-card connected"> | |
| <div class="status-icon"> | |
| <i class="fas fa-wifi"></i> | |
| </div> | |
| <div class="status-info"> | |
| <h3>WiFi Connected</h3> | |
| <p>Home_Network_5G - Excellent signal</p> | |
| <button class="btn btn-secondary btn-sm" onclick="disconnectWifi()"> | |
| <i class="fas fa-power-off"></i> Disconnect | |
| </button> | |
| </div> | |
| </div> | |
| <div class="status-card connected"> | |
| <div class="status-icon"> | |
| <i class="fas fa-ethernet"></i> | |
| </div> | |
| <div class="status-info"> | |
| <h3>Ethernet Active</h3> | |
| <p>enp3s0 - 1 Gbps link</p> | |
| <button class="btn btn-secondary btn-sm" onclick="showToast('Ethernet cable connected', 'info')"> | |
| <i class="fas fa-info-circle"></i> Details | |
| </button> | |
| </div> | |
| </div> | |
| <div class="status-card disconnected"> | |
| <div class="status-icon"> | |
| <i class="fas fa-shield-alt"></i> | |
| </div> | |
| <div class="status-info"> | |
| <h3>VPN Disconnected</h3> | |
| <p>No active VPN tunnel</p> | |
| <button class="btn btn-primary btn-sm" onclick="switchPage('vpn')"> | |
| <i class="fas fa-connectdevelop"></i> Connect | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="quick-actions"> | |
| <div class="action-card" onclick="switchPage('wifi')"> | |
| <i class="fas fa-wifi"></i> | |
| <h4>Scan WiFi</h4> | |
| <p>Find networks</p> | |
| </div> | |
| <div class="action-card" onclick="openModal('hotspotModal')"> | |
| <i class="fas fa-broadcast-tower"></i> | |
| <h4>Create Hotspot</h4> | |
| <p>Share connection</p> | |
| </div> | |
| <div class="action-card" onclick="openModal('vpnModal')"> | |
| <i class="fas fa-plus-circle"></i> | |
| <h4>Add VPN</h4> | |
| <p>New connection</p> | |
| </div> | |
| <div class="action-card" onclick="refreshNetworks()"> | |
| <i class="fas fa-sync-alt"></i> | |
| <h4>Refresh</h4> | |
| <p>Update status</p> | |
| </div> | |
| </div> | |
| <div class="card"> | |
| <div class="card-header"> | |
| <h3 class="card-title">Connection Statistics</h3> | |
| </div> | |
| <div class="ethernet-info"> | |
| <div class="info-item"> | |
| <label>Download Speed</label> | |
| <span style="color: var(--success); font-weight: bold;">125.4 Mbps</span> | |
| </div> | |
| <div class="info-item"> | |
| <label>Upload Speed</label> | |
| <span style="color: #2196f3; font-weight: bold;">45.2 Mbps</span> | |
| </div> | |
| <div class="info-item"> | |
| <label>Latency</label> | |
| <span style="color: var(--warning); font-weight: bold;">12 ms</span> | |
| </div> | |
| <div class="info-item"> | |
| <label>Packet Loss</label> | |
| <span style="color: var(--success); font-weight: bold;">0.0%</span> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- WiFi Page --> | |
| <div class="page" id="wifi"> | |
| <h2 class="page-title">WiFi Networks</h2> | |
| <p class="page-subtitle">Available wireless networks in your area</p> | |
| <div class="card"> | |
| <div class="card-header"> | |
| <h3 class="card-title">Saved Networks</h3> | |
| <button class="btn btn-primary btn-sm" onclick="scanWifi()"> | |
| <i class="fas fa-sync-alt"></i> Scan | |
| </button> | |
| </div> | |
| <div class="network-list" id="wifiList"> | |
| <!-- Networks will be populated by JS --> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Ethernet Page --> | |
| <div class="page" id="ethernet"> | |
| <h2 class="page-title">Ethernet Connections</h2> | |
| <p class="page-subtitle">Wired network configuration</p> | |
| <div class="card"> | |
| <div class="card-header"> | |
| <h3 class="card-title">Active Connection</h3> | |
| <span class="status-indicator" style="background: rgba(76, 175, 80, 0.15); border-color: rgba(76, 175, 80, 0.3);"> | |
| <div class="status-dot"></div> | |
| <span>Connected</span> | |
| </span> | |
| </div> | |
| <div class="ethernet-info"> | |
| <div class="info-item"> | |
| <label>Interface</label> | |
| <span>enp3s0</span> | |
| </div> | |
| <div class="info-item"> | |
| <label>IP Address</label> | |
| <span>192.168.1.105</span> | |
| </div> | |
| <div class="info-item"> | |
| <label>Subnet Mask</label> | |
| <span>255.255.255.0</span> | |
| </div> | |
| <div class="info-item"> | |
| <label>Gateway</label> | |
| <span>192.168.1.1</span> | |
| </div> | |
| <div class="info-item"> | |
| <label>DNS Servers</label> | |
| <span>8.8.8.8, 8.8.4.4</span> | |
| </div> | |
| <div class="info-item"> | |
| <label>MAC Address</label> | |
| <span>00:1A:2B:3C:4D:5E</span> | |
| </div> | |
| <div class="info-item"> | |
| <label>Link Speed</label> | |
| <span>1000 Mbps (Full Duplex)</span> | |
| </div> | |
| <div class="info-item"> | |
| <label>MTU</label> | |
| <span>1500</span> | |
| </div> | |
| </div> | |
| <div style="margin-top: 20px; display: flex; gap: 12px;"> | |
| <button class="btn btn-secondary" onclick="renewIP()"> | |
| <i class="fas fa-redo"></i> Renew IP | |
| </button> | |
| <button class="btn btn-secondary" onclick="openModal('ethernetModal')"> | |
| <i class="fas fa-cog"></i> Configure | |
| </button> | |
| </div> | |
| </div> | |
| <div class="card"> | |
| <div class="card-header"> | |
| <h3 class="card-title">Interface Statistics</h3> | |
| </div> | |
| <div class="ethernet-info"> | |
| <div class="info-item"> | |
| <label>Bytes Received</label> | |
| <span>2,547,892,341</span> | |
| </div> | |
| <div class="info-item"> | |
| <label>Bytes Sent</label> | |
| <span>1,892,547,234</span> | |
| </div> | |
| <div class="info-item"> | |
| <label>Packets Received</label> | |
| <span>18,492,734</span> | |
| </div> | |
| <div class="info-item"> | |
| <label>Packets Sent</label> | |
| <span>12,847,291</span> | |
| </div> | |
| <div class="info-item"> | |
| <label>RX Errors</label> | |
| <span style="color: var(--success);">0</span> | |
| </div> | |
| <div class="info-item"> | |
| <label>TX Errors</label> | |
| <span style="color: var(--success);">0</span> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- VPN Page --> | |
| <div class="page" id="vpn"> | |
| <h2 class="page-title">VPN Connections</h2> | |
| <p class="page-subtitle">Manage your virtual private network connections</p> | |
| <div class="card"> | |
| <div class="card-header"> | |
| <h3 class="card-title">VPN Tunnels</h3> | |
| <button class="btn btn-primary btn-sm" onclick="openModal('vpnModal')"> | |
| <i class="fas fa-plus"></i> Add VPN | |
| </button> | |
| </div> | |
| <div class="vpn-list" id="vpnList"> | |
| <!-- VPNs will be populated by JS --> | |
| </div> | |
| </div> | |
| <div class="card"> | |
| <div class="card-header"> | |
| <h3 class="card-title">VPN Configuration</h3> | |
| </div> | |
| <div class="form-group"> | |
| <label>VPN Type</label> | |
| <select id="vpnType"> | |
| <option value="openvpn">OpenVPN</option> | |
| <option value="wireguard">WireGuard</option> | |
| <option value="pptp">PPTP</option> | |
| <option value="ipsec">IPSec/L2TP</option> | |
| </select> | |
| </div> | |
| <div class="form-group"> | |
| <label>Gateway</label> | |
| <input type="text" placeholder="vpn.example.com"> | |
| </div> | |
| <div class="form-group"> | |
| <label>Authentication</label> | |
| <select> | |
| <option>Username/Password</option> | |
| <option>Certificate</option> | |
| <option>Pre-shared Key</option> | |
| </select> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Hotspot Page --> | |
| <div class="page" id="hotspot"> | |
| <h2 class="page-title">WiFi Hotspot</h2> | |
| <p class="page-subtitle">Share your internet connection with other devices</p> | |
| <div class="card"> | |
| <div class="card-header"> | |
| <h3 class="card-title">Hotspot Status</h3> | |
| <label class="toggle-switch"> | |
| <input type="checkbox" id="hotspotToggle" onchange="toggleHotspot()"> | |
| <span class="toggle-slider"></span> | |
| </label> | |
| </div> | |
| <div id="hotspotInfo"> | |
| <div class="form-group"> | |
| <label>Network Name (SSID)</label> | |
| <input type="text" value="Ubuntu_Hotspot" id="ssidInput"> | |
| </div> | |
| <div class="form-group"> | |
| <label>Password</label> | |
| <input type="password" value="securepass123" id="passwordInput"> | |
| </div> | |
| <div class="form-group"> | |
| <label>Security</label> | |
| <select> | |
| <option>WPA2/WPA3</option> | |
| <option>WPA2 Only</option> | |
| <option>Open (No Password)</option> | |
| </select> | |
| </div> | |
| <div style="margin-top: 20px; padding: 15px; background: var(--bg-tertiary); border-radius: 10px;"> | |
| <p style="margin-bottom: 10px;"><strong>Connected Devices:</strong> <span id="deviceCount">0</span></p> | |
| <p style="color: var(--text-secondary); font-size: 0.9rem;"> | |
| <i class="fas fa-info-circle"></i> | |
| Your hotspot will use the currently active internet connection to share with other devices. | |
| </p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Terminal Tools Page --> | |
| <div class="page" id="terminal"> | |
| <h2 class="page-title">Network Tools</h2> | |
| <p class="page-subtitle">Command-line diagnostic tools</p> | |
| <div class="card"> | |
| <div class="card-header"> | |
| <h3 class="card-title">Quick Commands</h3> | |
| </div> | |
| <div style="display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px;"> | |
| <button class="btn btn-secondary" onclick="runCommand('ping')"> | |
| <i class="fas fa-crosshairs"></i> Ping | |
| </button> | |
| <button class="btn btn-secondary" onclick="runCommand('traceroute')"> | |
| <i class="fas fa-route"></i> Traceroute | |
| </button> | |
| <button class="btn btn-secondary" onclick="runCommand('dns')"> | |
| <i class="fas fa-globe"></i> DNS Lookup | |
| </button> | |
| <button class="btn btn-secondary" onclick="runCommand('speedtest')"> | |
| <i class="fas fa-tachometer-alt"></i> Speed Test | |
| </button> | |
| <button class="btn btn-secondary" onclick="runCommand('netstat')"> | |
| <i class="fas fa-list"></i> Netstat | |
| </button> | |
| <button class="btn btn-secondary" onclick="runCommand('arp')"> | |
| <i class="fas fa-network-wired"></i> ARP Table | |
| </button> | |
| </div> | |
| <div class="form-group"> | |
| <label>Custom Command</label> | |
| <div style="display: flex; gap: 10px;"> | |
| <input type="text" id="customCmd" placeholder="Enter command (e.g., ifconfig, ip addr)"> | |
| <button class="btn btn-primary" onclick="runCustomCommand()"> | |
| <i class="fas fa-play"></i> Run | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="card"> | |
| <div class="card-header"> | |
| <h3 class="card-title">Terminal Output</h3> | |
| <button class="btn btn-secondary btn-sm" onclick="clearTerminal()"> | |
| <i class="fas fa-trash"></i> Clear | |
| </button> | |
| </div> | |
| <div class="terminal" id="terminalOutput"> | |
| <div class="terminal-line"> | |
| <span class="prompt">user@ubuntu:~$</span> | |
| <span class="command">nmcli general status</span> | |
| </div> | |
| <div class="terminal-line"> | |
| <span class="output">STATE CONNECTIVITY WIFI-HW WIFI WWAN-HW WWAN </span> | |
| </div> | |
| <div class="terminal-line"> | |
| <span class="output">connected full enabled enabled enabled enabled </span> | |
| </div> | |
| <div class="terminal-line"> | |
| <span class="prompt">user@ubuntu:~$</span> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </main> | |
| </div> | |
| <!-- Modals --> | |
| <!-- WiFi Connect Modal --> | |
| <div class="modal-overlay" id="wifiConnectModal"> | |
| <div class="modal"> | |
| <div class="modal-header"> | |
| <h2>Connect to WiFi</h2> | |
| <button class="modal-close" onclick="closeModal('wifiConnectModal')"> | |
| <i class="fas fa-times"></i> | |
| </button> | |
| </div> | |
| <div class="form-group"> | |
| <label>Network Name</label> | |
| <input type="text" id="connectSsid" readonly> | |
| </div> | |
| <div class="form-group"> | |
| <label>Password</label> | |
| <input type="password" id="connectPassword" placeholder="Enter network password"> | |
| </div> | |
| <div class="form-group"> | |
| <label> | |
| <input type="checkbox" id="showPassword"> Show password | |
| </label> | |
| </div> | |
| <div class="modal-actions"> | |
| <button class="btn btn-secondary" onclick="closeModal('wifiConnectModal')">Cancel</button> | |
| <button class="btn btn-primary" onclick="connectToWifi()">Connect</button> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Add VPN Modal --> | |
| <div class="modal-overlay" id="vpnModal"> | |
| <div class="modal"> | |
| <div class="modal-header"> | |
| <h2>Add VPN Connection</h2> | |
| <button class="modal-close" onclick="closeModal('vpnModal')"> | |
| <i class="fas fa-times"></i> | |
| </button> | |
| </div> | |
| <div class="form-group"> | |
| <label>Connection Name</label> | |
| <input type="text" placeholder="My VPN"> | |
| </div> | |
| <div class="form-group"> | |
| <label>Gateway</label> | |
| <input type="text" placeholder="vpn.example.com"> | |
| </div> | |
| <div class="form-group"> | |
| <label>VPN Type</label> | |
| <select> | |
| <option>OpenVPN</option> | |
| <option>WireGuard</option> | |
| <option>PPTP</option> | |
| </select> | |
| </div> | |
| <div class="form-group"> | |
| <label>Username</label> | |
| <input type="text" placeholder="your-username"> | |
| </div> | |
| <div class="form-group"> | |
| <label>Password</label> | |
| <input type="password" placeholder="••••••••"> | |
| </div> | |
| <div class="modal-actions"> | |
| <button class="btn btn-secondary" onclick="closeModal('vpnModal')">Cancel</button> | |
| <button class="btn btn-primary" onclick="addVpn()">Add VPN</button> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Hotspot Modal --> | |
| <div class="modal-overlay" id="hotspotModal"> | |
| <div class="modal"> | |
| <div class="modal-header"> | |
| <h2>Create Hotspot</h2> | |
| <button class="modal-close" onclick="closeModal('hotspotModal')"> | |
| <i class="fas fa-times"></i> | |
| </button> | |
| </div> | |
| <div class="form-group"> | |
| <label>Hotspot Name</label> | |
| <input type="text" value="Ubuntu_Hotspot"> | |
| </div> | |
| <div class="form-group"> | |
| <label>Password</label> | |
| <input type="password" value="securepass123"> | |
| </div> | |
| <div class="modal-actions"> | |
| <button class="btn btn-secondary" onclick="closeModal('hotspotModal')"> |