This repository has been archived by the owner on Aug 27, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1516534
commit 251e1c9
Showing
5 changed files
with
112 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<title>WebSocks</title> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/css/bulma.min.css" integrity="sha256-zIG416V1ynj3Wgju/scU80KAEWOsO5rRLfVyRDuOv7Q=" crossorigin="anonymous"> | ||
{% block head %} {% endblock %} | ||
</head> | ||
<body> | ||
{% block body %} {% endblock %} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,29 @@ | ||
{% extends "base/base.html" %} {% block body %} | ||
{% extends "base/base.html" %} | ||
{% block head %} | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bulma-switch.min.css" | ||
integrity="sha256-jCV/cXwP13w0GNHLgFx6SFgTNAvJPvS5MIhuE30Ng08=" crossorigin="anonymous"> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/axios.min.js" | ||
integrity="sha256-mpnrJ5DpEZZkwkE1ZgkEQQJW/46CSEh/STrZKOB/qoM=" crossorigin="anonymous"></script> | ||
<script> | ||
function Run() { | ||
let params = new URLSearchParams(); | ||
params.append("ListenAddr", document.getElementById("ListenAddr").value); | ||
params.append("ServerURL", document.getElementById("ServerURL").value); | ||
params.append("SNI", document.getElementById("SNI").value); | ||
params.append("InsecureCert", document.getElementById("InsecureCert").value); | ||
//todo bool | ||
console.log(document.getElementById("InsecureCert").checked); | ||
axios.post('/api/client', params) | ||
.then(function (response) { | ||
console.log(response); | ||
}) | ||
.catch(function (error) { | ||
console.log(error); | ||
}); | ||
} | ||
</script> | ||
{% endblock %} | ||
{% block body %} | ||
<section class="section"> | ||
<div class="container"> | ||
<h1 class="title"> | ||
|
@@ -8,23 +33,45 @@ <h1 class="title"> | |
A secure proxy based on websocket. | ||
</p> | ||
|
||
<form action="/api/client" method="post"> | ||
<div class="field"> | ||
<label class="label">Server URL</label> | ||
<div class="control"> | ||
<input class="input" type="text" placeholder="wss://server.com:2333/password"> | ||
</div> | ||
</div> | ||
</section> | ||
|
||
<section> | ||
<div class="container"> | ||
<div class="field"> | ||
<label class="label">ListenAddr</label> | ||
<div class="control"> | ||
<input class="input" type="text" id="ListenAddr" name="ListenAddr" placeholder=":10801"> | ||
</div> | ||
</div> | ||
|
||
<div class="field"> | ||
<label class="label">ServerURL</label> | ||
<div class="control"> | ||
<input class="input" type="text" id="ServerURL" name="ServerURL" | ||
placeholder="wss://server.com:2333/password"> | ||
</div> | ||
</div> | ||
|
||
<div class="field"> | ||
<label class="label">SNI</label> | ||
<div class="control"> | ||
<input class="input" type="text" id="SNI" name="SNI" placeholder="mirror.centos.org"> | ||
</div> | ||
</div> | ||
|
||
<div class="field"> | ||
<p class="control"> | ||
<button class="button"> | ||
Start | ||
</button> | ||
</p> | ||
</div> | ||
<div class="field"> | ||
<div class="control"> | ||
<input type="checkbox" id="InsecureCert" name="InsecureCert" class="switch" checked="checked"> | ||
<label for="InsecureCert">InsecureCert</label> | ||
</div> | ||
</form> | ||
</div> | ||
|
||
<div class="field"> | ||
<p class="control"> | ||
<button class="button" onclick="Run()">Start</button> | ||
</p> | ||
</div> | ||
</div> | ||
</section> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters