Skip to content

Commit 3149c39

Browse files
authored
Merge pull request #1 from CoNET-project/test
Test
2 parents 5f51db9 + 2322171 commit 3149c39

File tree

25 files changed

+11592
-692
lines changed

25 files changed

+11592
-692
lines changed

MIT_LICENSE

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Copyright 2025 CoNET Labs.
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4+
5+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6+
7+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 5 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,11 @@
1-
# Getting Started with Create React App
1+
# Silent Pass VPN UI
22

3-
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
3+
Silent Pass combines decentralization, fragmentation, and a zero-trust architecture to deliver unparalleled internet privacy.
44

5-
## Available Scripts
5+
[White Paper](https://doceng.conet.network/web2-bridging)
66

7-
In the project directory, you can run:
87

9-
### `npm start`
108

11-
Runs the app in the development mode.\
12-
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
9+
## License
1310

14-
The page will reload if you make edits.\
15-
You will also see any lint errors in the console.
16-
17-
### `npm test`
18-
19-
Launches the test runner in the interactive watch mode.\
20-
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
21-
22-
### `npm run build`
23-
24-
Builds the app for production to the `build` folder.\
25-
It correctly bundles React in production mode and optimizes the build for the best performance.
26-
27-
The build is minified and the filenames include the hashes.\
28-
Your app is ready to be deployed!
29-
30-
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
31-
32-
### `npm run eject`
33-
34-
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
35-
36-
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
37-
38-
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
39-
40-
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
41-
42-
## Learn More
43-
44-
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
45-
46-
To learn React, check out the [React documentation](https://reactjs.org/).
11+
Silent Pass VPN is licensed under the MIT License (`MIT`), see [MIT_LICENSE](./MIT_LICENSE)

package-lock.json

Lines changed: 43 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,18 @@
1212
"async": "^3.2.6",
1313
"axios": "^1.7.7",
1414
"blobshape": "^1.0.0",
15+
"copy-to-clipboard": "^3.3.3",
1516
"ethers": "^6.13.4",
1617
"openpgp": "^6.0.1",
1718
"pouchdb": "^9.0.0",
1819
"react": "^18.3.1",
1920
"react-country-flag": "^3.1.0",
2021
"react-dom": "^18.3.1",
22+
"react-icons": "^5.4.0",
2123
"react-router-dom": "^6.27.0",
2224
"react-scripts": "5.0.1",
23-
"stream-http": "^3.2.0",
2425
"react-spring": "^9.7.4",
26+
"stream-http": "^3.2.0",
2527
"typescript": "^4.9.5",
2628
"web-vitals": "^2.1.4"
2729
},
@@ -51,7 +53,7 @@
5153
},
5254
"devDependencies": {
5355
"@types/async": "^3.2.24",
54-
"@types/node": "^22.9.3",
55-
"@types/blobshape": "^1.0.3"
56+
"@types/blobshape": "^1.0.3",
57+
"@types/node": "^22.9.3"
5658
}
57-
}
59+
}
File renamed without changes.

public/assets/copy-white.svg

Lines changed: 10 additions & 0 deletions
Loading

public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<head>
55
<meta charset="utf-8" />
66
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
7-
<meta name="viewport" content="width=device-width, initial-scale=1" />
7+
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
88
<meta name="theme-color" content="#000000" />
99
<meta name="description" content="Web site created using create-react-app" />
1010
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />

src/App.tsx

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,38 @@
1-
import React, { useContext, useEffect } from "react";
1+
import React, {useEffect } from "react";
22
import "./App.css";
33
import { HashRouter as Router, Route, Routes } from "react-router-dom";
44

55
import { Home, Region } from "./pages";
66
import About from './pages/About';
7-
import { DaemonProvider, useDaemonContext } from "./providers/DaemonProvider";
7+
import { useDaemonContext } from "./providers/DaemonProvider";
88
import { createOrGetWallet } from "./services/wallets";
9-
import { startMiningV2 } from "./services/mining";
9+
import { getAllNodes, startMiningV2 } from "./services/mining";
1010
import { CoNET_Data } from "./utils/globals";
1111
import { listenProfileVer } from "./services/listeners";
12+
import Vip from './pages/Vip';
1213

1314
global.Buffer = require('buffer').Buffer;
1415

1516
function App() {
1617

17-
const { setProfile, setMiningData } = useDaemonContext()
18+
const { setProfile, setMiningData, allRegions, setClosestRegion, setaAllNodes } = useDaemonContext();
1819

1920
useEffect(() => {
21+
// if (allRegions.length === 0) return
22+
2023
const init = async () => {
2124
await createOrGetWallet();
2225
listenProfileVer(setProfile);
2326

24-
if (!CoNET_Data || !CoNET_Data?.profiles) return
27+
await getAllNodes(allRegions, setClosestRegion, (allNodes: nodes_info[]) => {
28+
setaAllNodes(allNodes)
29+
if (!CoNET_Data || !CoNET_Data?.profiles) {
30+
return
31+
}
32+
startMiningV2(CoNET_Data?.profiles?.[0], allRegions, setMiningData);
33+
});
2534

26-
await startMiningV2(CoNET_Data?.profiles?.[0], setMiningData);
35+
2736
};
2837

2938
init();
@@ -35,6 +44,7 @@ function App() {
3544
<Routes>
3645
<Route path="/regions" element={<Region />}></Route>
3746
<Route path="/about" element={<About />}></Route>
47+
<Route path="/vip" element={<Vip />}></Route>
3848
<Route path="/" element={<Home />}></Route>
3949
</Routes>
4050
</Router>
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
.blob-wrapper {
22
position: relative;
3-
margin: 48px 0 28px;
4-
}
3+
margin: 38px 0;
4+
justify-content: center;
5+
align-items: center;
6+
display: flex;
7+
}

0 commit comments

Comments
 (0)