cw332 commited on
Commit
b9c61c0
·
verified ·
1 Parent(s): 34546bd

## MAIN CONCEPT ##

Browse files

Simple proxy redirection service

## FRONTEND (UI) ##

- Simple, minimal page with a (labeled) URL input field for the user to enter a web address
- When user submits the URL address, they are redirected (automatically) to a PROXIED version of the destination wherein the user's (client) IP address (specifically their GeoIP address details and general location information) is concealed/hidden from the host site they are visiting.

## UI/UX Design ##

Minimal, smooth, TailwindCSS-like or shadcn/ui or RadixUI like with smooth animation transitions and clear, clean, easily readible typography (specifically, "Inter" typeface font with a base size of 18px (1..112rem or 112.5% font size).

Files changed (6) hide show
  1. README.md +7 -4
  2. components/footer.js +83 -0
  3. components/navbar.js +75 -0
  4. index.html +112 -19
  5. script.js +23 -0
  6. style.css +16 -23
README.md CHANGED
@@ -1,10 +1,13 @@
1
  ---
2
- title: Ghostsurf Invisible Proxy Voyager
3
- emoji: 😻
4
  colorFrom: gray
5
- colorTo: green
 
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
1
  ---
2
+ title: GhostSurf - Invisible Proxy Voyager 👻
 
3
  colorFrom: gray
4
+ colorTo: purple
5
+ emoji: 🐳
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite-v3
10
  ---
11
 
12
+ # Welcome to your new DeepSite project!
13
+ This project was created with [DeepSite](https://huggingface.co/deepsite).
components/footer.js ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class CustomFooter extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ footer {
7
+ background: #111827;
8
+ color: white;
9
+ padding: 2.5rem 1rem;
10
+ text-align: center;
11
+ margin-top: auto;
12
+ }
13
+ .footer-content {
14
+ max-width: 1200px;
15
+ margin: 0 auto;
16
+ display: grid;
17
+ grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
18
+ gap: 2rem;
19
+ text-align: left;
20
+ }
21
+ .footer-section h3 {
22
+ font-weight: 600;
23
+ margin-bottom: 1rem;
24
+ color: #e5e7eb;
25
+ }
26
+ .footer-links {
27
+ display: flex;
28
+ flex-direction: column;
29
+ gap: 0.5rem;
30
+ }
31
+ .footer-links a {
32
+ color: #9ca3af;
33
+ text-decoration: none;
34
+ transition: color 0.2s;
35
+ }
36
+ .footer-links a:hover {
37
+ color: white;
38
+ }
39
+ .copyright {
40
+ margin-top: 2rem;
41
+ padding-top: 1.5rem;
42
+ border-top: 1px solid #374151;
43
+ color: #9ca3af;
44
+ font-size: 0.875rem;
45
+ }
46
+ @media (max-width: 640px) {
47
+ .footer-content {
48
+ grid-template-columns: 1fr;
49
+ gap: 1.5rem;
50
+ }
51
+ }
52
+ </style>
53
+ <footer>
54
+ <div class="footer-content">
55
+ <div class="footer-section">
56
+ <h3>GhostSurf</h3>
57
+ <p class="text-gray-400">Browse the web anonymously with our secure proxy service.</p>
58
+ </div>
59
+ <div class="footer-section">
60
+ <h3>Quick Links</h3>
61
+ <div class="footer-links">
62
+ <a href="/"><i data-feather="home" width="14" height="14"></i> Home</a>
63
+ <a href="/about.html"><i data-feather="info" width="14" height="14"></i> About</a>
64
+ <a href="/privacy.html"><i data-feather="shield" width="14" height="14"></i> Privacy</a>
65
+ </div>
66
+ </div>
67
+ <div class="footer-section">
68
+ <h3>Legal</h3>
69
+ <div class="footer-links">
70
+ <a href="/terms.html">Terms of Service</a>
71
+ <a href="/privacy.html">Privacy Policy</a>
72
+ <a href="/cookies.html">Cookie Policy</a>
73
+ </div>
74
+ </div>
75
+ </div>
76
+ <div class="copyright">
77
+ &copy; ${new Date().getFullYear()} GhostSurf. All rights reserved.
78
+ </div>
79
+ </footer>
80
+ `;
81
+ }
82
+ }
83
+ customElements.define('custom-footer', CustomFooter);
components/navbar.js ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class CustomNavbar extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ nav {
7
+ background: white;
8
+ padding: 1rem 2rem;
9
+ display: flex;
10
+ justify-content: space-between;
11
+ align-items: center;
12
+ box-shadow: 0 1px 3px rgba(0,0,0,0.1);
13
+ position: relative;
14
+ z-index: 10;
15
+ }
16
+ .logo {
17
+ color: #111827;
18
+ font-weight: 700;
19
+ font-size: 1.25rem;
20
+ display: flex;
21
+ align-items: center;
22
+ gap: 0.5rem;
23
+ }
24
+ .logo-icon {
25
+ color: #6366f1;
26
+ }
27
+ ul {
28
+ display: flex;
29
+ gap: 1.5rem;
30
+ list-style: none;
31
+ margin: 0;
32
+ padding: 0;
33
+ }
34
+ a {
35
+ color: #4b5563;
36
+ text-decoration: none;
37
+ font-weight: 500;
38
+ transition: color 0.2s;
39
+ display: flex;
40
+ align-items: center;
41
+ gap: 0.375rem;
42
+ }
43
+ a:hover {
44
+ color: #6366f1;
45
+ }
46
+ .nav-icon {
47
+ width: 18px;
48
+ height: 18px;
49
+ }
50
+ @media (max-width: 640px) {
51
+ nav {
52
+ padding: 1rem;
53
+ flex-direction: column;
54
+ gap: 1rem;
55
+ }
56
+ ul {
57
+ gap: 1rem;
58
+ }
59
+ }
60
+ </style>
61
+ <nav>
62
+ <a href="/" class="logo">
63
+ <i data-feather="ghost" class="logo-icon"></i>
64
+ GhostSurf
65
+ </a>
66
+ <ul>
67
+ <li><a href="/"><i data-feather="home" class="nav-icon"></i> Home</a></li>
68
+ <li><a href="/about.html"><i data-feather="info" class="nav-icon"></i> About</a></li>
69
+ <li><a href="/privacy.html"><i data-feather="shield" class="nav-icon"></i> Privacy</a></li>
70
+ </ul>
71
+ </nav>
72
+ `;
73
+ }
74
+ }
75
+ customElements.define('custom-navbar', CustomNavbar);
index.html CHANGED
@@ -1,19 +1,112 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>GhostSurf - Anonymous Web Proxy</title>
7
+ <link rel="icon" type="image/x-icon" href="/static/favicon.ico">
8
+ <link rel="stylesheet" href="style.css">
9
+ <script src="https://cdn.tailwindcss.com"></script>
10
+ <script src="https://unpkg.com/feather-icons"></script>
11
+ <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
12
+ <script>
13
+ tailwind.config = {
14
+ theme: {
15
+ extend: {
16
+ fontFamily: {
17
+ sans: ['Inter', 'sans-serif'],
18
+ },
19
+ colors: {
20
+ primary: {
21
+ 500: '#6366f1',
22
+ 600: '#4f46e5',
23
+ },
24
+ secondary: {
25
+ 500: '#10b981',
26
+ 600: '#059669',
27
+ }
28
+ }
29
+ }
30
+ }
31
+ }
32
+ </script>
33
+ </head>
34
+ <body class="bg-gray-50 min-h-screen flex flex-col">
35
+ <custom-navbar></custom-navbar>
36
+
37
+ <main class="flex-grow flex items-center justify-center px-4 py-12">
38
+ <div class="w-full max-w-md mx-auto">
39
+ <div class="text-center mb-8">
40
+ <h1 class="text-4xl font-bold text-gray-900 mb-2">GhostSurf</h1>
41
+ <p class="text-lg text-gray-600">Browse anonymously with our invisible proxy</p>
42
+ </div>
43
+
44
+ <div class="bg-white rounded-xl shadow-lg p-8">
45
+ <form id="proxyForm" class="space-y-6">
46
+ <div>
47
+ <label for="url" class="block text-sm font-medium text-gray-700 mb-1">Enter URL to visit anonymously</label>
48
+ <div class="relative rounded-md shadow-sm">
49
+ <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
50
+ <i data-feather="globe" class="text-gray-400"></i>
51
+ </div>
52
+ <input type="url" id="url" name="url" required
53
+ class="focus:ring-primary-500 focus:border-primary-500 block w-full pl-10 pr-12 py-3 border-gray-300 rounded-md"
54
+ placeholder="https://example.com">
55
+ <div class="absolute inset-y-0 right-0 flex items-center">
56
+ <button type="submit"
57
+ class="px-4 h-full bg-primary-500 text-white rounded-r-md hover:bg-primary-600 focus:outline-none focus:ring-2 focus:ring-primary-500 transition-colors">
58
+ Go
59
+ </button>
60
+ </div>
61
+ </div>
62
+ </div>
63
+
64
+ <div class="flex items-center">
65
+ <input id="remember" name="remember" type="checkbox" class="h-4 w-4 text-primary-500 focus:ring-primary-500 border-gray-300 rounded">
66
+ <label for="remember" class="ml-2 block text-sm text-gray-700">
67
+ Remember my preferences
68
+ </label>
69
+ </div>
70
+ </form>
71
+
72
+ <div class="mt-8 pt-6 border-t border-gray-200">
73
+ <h3 class="text-sm font-medium text-gray-700 mb-3">How it works</h3>
74
+ <ul class="space-y-3 text-sm text-gray-600">
75
+ <li class="flex items-start">
76
+ <i data-feather="shield" class="text-primary-500 mr-2 mt-0.5"></i>
77
+ <span>Your IP address and location are hidden</span>
78
+ </li>
79
+ <li class="flex items-start">
80
+ <i data-feather="lock" class="text-primary-500 mr-2 mt-0.5"></i>
81
+ <span>Secure encrypted connection</span>
82
+ </li>
83
+ <li class="flex items-start">
84
+ <i data-feather="zap" class="text-primary-500 mr-2 mt-0.5"></i>
85
+ <span>Fast proxy servers worldwide</span>
86
+ </li>
87
+ </ul>
88
+ </div>
89
+ </div>
90
+ </div>
91
+ </main>
92
+
93
+ <custom-footer></custom-footer>
94
+
95
+ <script src="components/navbar.js"></script>
96
+ <script src="components/footer.js"></script>
97
+ <script src="script.js"></script>
98
+ <script>
99
+ feather.replace();
100
+
101
+ document.getElementById('proxyForm').addEventListener('submit', function(e) {
102
+ e.preventDefault();
103
+ const url = document.getElementById('url').value;
104
+ if (url) {
105
+ // In a real implementation, this would redirect through your proxy service
106
+ window.location.href = `/proxy?url=${encodeURIComponent(url)}`;
107
+ }
108
+ });
109
+ </script>
110
+ <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
111
+ </body>
112
+ </html>
script.js ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Shared functionality across pages
2
+ console.log('GhostSurf proxy service initialized');
3
+
4
+ // Form validation for proxy input
5
+ function validateUrl(url) {
6
+ try {
7
+ new URL(url);
8
+ return true;
9
+ } catch (e) {
10
+ return false;
11
+ }
12
+ }
13
+
14
+ // Service worker registration for offline capabilities
15
+ if ('serviceWorker' in navigator) {
16
+ window.addEventListener('load', () => {
17
+ navigator.serviceWorker.register('/sw.js').then(registration => {
18
+ console.log('ServiceWorker registration successful');
19
+ }).catch(err => {
20
+ console.log('ServiceWorker registration failed: ', err);
21
+ });
22
+ });
23
+ }
style.css CHANGED
@@ -1,28 +1,21 @@
1
- body {
2
- padding: 2rem;
3
- font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
4
- }
5
-
6
- h1 {
7
- font-size: 16px;
8
- margin-top: 0;
9
- }
10
 
11
- p {
12
- color: rgb(107, 114, 128);
13
- font-size: 15px;
14
- margin-bottom: 10px;
15
- margin-top: 5px;
16
  }
17
 
18
- .card {
19
- max-width: 620px;
20
- margin: 0 auto;
21
- padding: 16px;
22
- border: 1px solid lightgray;
23
- border-radius: 16px;
 
 
24
  }
25
 
26
- .card p:last-child {
27
- margin-bottom: 0;
28
- }
 
1
+ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
 
 
 
 
 
 
 
 
2
 
3
+ body {
4
+ font-family: 'Inter', sans-serif;
5
+ font-size: 1.125rem;
6
+ line-height: 1.6;
 
7
  }
8
 
9
+ /* Animation for form submission */
10
+ @keyframes pulse {
11
+ 0%, 100% {
12
+ transform: scale(1);
13
+ }
14
+ 50% {
15
+ transform: scale(1.02);
16
+ }
17
  }
18
 
19
+ .submitting {
20
+ animation: pulse 1.5s infinite;
21
+ }