Skip to content

Commit

Permalink
re-write proxy to typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
Luna-devv committed Aug 9, 2022
1 parent a30fca2 commit 7ee3781
Show file tree
Hide file tree
Showing 28 changed files with 571 additions and 484 deletions.
17 changes: 0 additions & 17 deletions README.md

This file was deleted.

8 changes: 8 additions & 0 deletions dist/Config.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export declare const Config: {
port: {
http: number;
proxy: number;
};
outTimeout: number;
inTimeout: number;
};
12 changes: 12 additions & 0 deletions dist/Config.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/Config.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/app.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export {};
14 changes: 14 additions & 0 deletions dist/app.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/app.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 43 additions & 0 deletions dist/hosts.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
declare const _default: {
"api.waya.one": {
target: number;
type: string;
arc: boolean;
};
"whois.waya.one": {
target: number;
type: string;
arc: boolean;
};
"lunish.gay": {
target: number;
type: string;
arc: boolean;
};
"www.lunish.gay": {
target: number;
type: string;
arc: boolean;
};
"lunish.nl": {
target: number;
type: string;
arc: boolean;
};
"www.lunish.nl": {
target: number;
type: string;
arc: boolean;
};
"waya.one": {
target: number;
type: string;
arc: boolean;
};
"www.waya.one": {
target: number;
type: string;
arc: boolean;
};
};
export default _default;
45 changes: 45 additions & 0 deletions dist/hosts.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/hosts.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions dist/server.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export declare const proxy: any;
export declare function requestManager(req: any, res: any): Promise<any>;
export declare function onError(err: any, req: any, res: any): Promise<any>;
79 changes: 79 additions & 0 deletions dist/server.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/server.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

78 changes: 78 additions & 0 deletions html/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<html lang="en">

<head>
<meta charset="UTF-8">
<meta httpEquiv='Content-Type' content='text/html; charset=utf-8' />
<meta name='viewport' content='width=device-width, initial-scale=0.8' />
<title>505 | {host}</title>
</head>

<body>
<div style="display: flex; justify-content: center; text-align: center; margin-top: 3rem;">
<div>
<div style="font-size: 4rem">Webserver Not Found</div>
</div>
</div>
<div style="display: flex; justify-content: center; text-align: center; margin-top: 2rem;">
<main>
<div style="margin: 1rem">
<div style="font-size: 2.2rem; width: 90vw; max-width: 20rem">What happened?</div>
<content stlye="font-size: 1.8rem">
You've requested a domain name which points to an IP address <br />
that is part of the Waya network but no associated webserver could be found.
</content>
</div>
<br />
<div style="margin: 1rem">
<div style="font-size: 2.2rem; width: 90vw; max-width: 20rem;">How to resolve?</div>
<content stlye="font-size: 1.8rem">
Connect to the server and get started in <text>/root/proxy/src/hosts.js</text>. <br />
The documentation can be found on GitHub at <a
href='https://github.com/Luna-devv/proxy'>github.com/Luna-devv/proxy</a>. <br />
If you don't know what you're doing at this point, please contact <a
href="https://waya.one/go/luna?utm_source=proxy">Luna</a>.
</content>
</div>
</main>
</div>
</body>
<style>
@import url('https://fonts.googleapis.com/css2?family=Ubuntu&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Open+Sans&display=swap');

html {
font-family: 'Ubuntu', sans-serif;
background-color: #242029;
color: rgb(221, 217, 230);
}

text {
background-color: #131418;
color: #9fa2a7;
padding: 0.1rem 0.2rem 0.1rem 0.2rem;
border-radius: 0.2rem;
user-select: all;
}

a {
all: unset;
font-family: 'Open Sans', sans-serif;
color: #b671a7;
cursor: pointer;
transition-duration: 200ms;
}

a:hover {
color: #d99ecc;
}

main {
text-align: left;
}

content {
color: #aba8b3
}
</style>

</html>
Loading

0 comments on commit 7ee3781

Please sign in to comment.