delete code.....
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"image": "mcr.microsoft.com/devcontainers/universal:2",
|
||||
"features": {
|
||||
"ghcr.io/devcontainers-contrib/features/deno:1": {}
|
||||
},
|
||||
"postCreateCommand": "npm install"
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
# Editor configuration, see http://editorconfig.org
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
max_line_length = off
|
||||
trim_trailing_whitespace = false
|
||||
@@ -1 +0,0 @@
|
||||
node_modules
|
||||
@@ -1,42 +0,0 @@
|
||||
{
|
||||
"root": true,
|
||||
"ignorePatterns": ["**/*"],
|
||||
"plugins": ["@nx"],
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
||||
"rules": {
|
||||
"@nx/enforce-module-boundaries": [
|
||||
"error",
|
||||
{
|
||||
"enforceBuildableLibDependency": true,
|
||||
"allow": [],
|
||||
"depConstraints": [
|
||||
{
|
||||
"sourceTag": "*",
|
||||
"onlyDependOnLibsWithTags": ["*"]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": ["*.ts", "*.tsx"],
|
||||
"extends": ["plugin:@nx/typescript"],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
"files": ["*.js", "*.jsx"],
|
||||
"extends": ["plugin:@nx/javascript"],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
"files": ["*.spec.ts", "*.spec.tsx", "*.spec.js", "*.spec.jsx"],
|
||||
"env": {
|
||||
"jest": true
|
||||
},
|
||||
"rules": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
55
.gitignore
vendored
@@ -1,55 +0,0 @@
|
||||
# See http://help.github.com/ignore-files/ for more about ignoring files.
|
||||
|
||||
# compiled output
|
||||
# https://theapache64.github.io/git-do-not-ignore/
|
||||
!dist/
|
||||
dist/*
|
||||
!dist/apps/
|
||||
dist/apps/*
|
||||
!dist/apps/cf-page
|
||||
!dist/apps/node-vless
|
||||
|
||||
tmp
|
||||
/out-tsc
|
||||
|
||||
# dependencies
|
||||
node_modules
|
||||
|
||||
# IDEs and editors
|
||||
/.idea
|
||||
.project
|
||||
.classpath
|
||||
.c9/
|
||||
*.launch
|
||||
.settings/
|
||||
*.sublime-workspace
|
||||
|
||||
# IDE - VSCode
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
|
||||
# misc
|
||||
/.sass-cache
|
||||
/connect.lock
|
||||
/coverage
|
||||
/libpeerconnection.log
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
testem.log
|
||||
/typings
|
||||
|
||||
# System Files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
##
|
||||
**/config-local.json
|
||||
|
||||
**/.env
|
||||
|
||||
**/.dev.vars
|
||||
wrangler.toml
|
||||
.npmrc
|
||||
@@ -1,4 +0,0 @@
|
||||
# Add files here to ignore them from prettier formatting
|
||||
|
||||
/dist
|
||||
/coverage
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"singleQuote": true
|
||||
}
|
||||
12
.vscode/extensions.json
vendored
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"recommendations": [
|
||||
"nrwl.angular-console",
|
||||
"esbenp.prettier-vscode",
|
||||
"dbaeumer.vscode-eslint",
|
||||
"firsttris.vscode-jest-runner",
|
||||
"denoland.vscode-deno",
|
||||
"GitHub.copilot",
|
||||
"GitHub.copilot-labs",
|
||||
"eamodio.gitlens"
|
||||
]
|
||||
}
|
||||
28
.vscode/launch.json
vendored
@@ -1,28 +0,0 @@
|
||||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Attach by Process ID",
|
||||
"processId": "${command:PickProcess}",
|
||||
"request": "attach",
|
||||
"skipFiles": ["<node_internals>/**"],
|
||||
"type": "node"
|
||||
},
|
||||
{
|
||||
"request": "launch",
|
||||
"name": "Launch Program",
|
||||
"type": "pwa-node",
|
||||
"program": "C:\\github\\test-deno\\apps\\deno-vless\\src\\main.ts",
|
||||
"cwd": "${workspaceFolder}",
|
||||
"runtimeExecutable": "C:\\Users\\zizifn\\scoop\\shims\\deno.EXE",
|
||||
"runtimeArgs": ["run", "--inspect", "--allow-all", "--unstable"],
|
||||
"attachSimplePort": 9229,
|
||||
"env": {
|
||||
"UUID": "e0a102c8-51c8-436c-860b-ef279d8a6ada"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
12
.vscode/settings.json
vendored
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"deno.codeLens.implementations": true,
|
||||
"deno.codeLens.references": true,
|
||||
"deno.enablePaths": [
|
||||
"apps/deno-vless/src/deno",
|
||||
"apps/deno-vless/src/main.ts",
|
||||
"apps/deno-vless/src/deno-test.ts",
|
||||
"apps/deno-vless2"
|
||||
],
|
||||
"deno.unstable": true,
|
||||
"deno.importMap": "./import_map.json"
|
||||
}
|
||||
12
Dockerfile
@@ -1,12 +0,0 @@
|
||||
FROM node:slim
|
||||
|
||||
ENV NODE_ENV=production
|
||||
ENV PORT=4100
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY dist dist/
|
||||
|
||||
EXPOSE 4100
|
||||
|
||||
CMD [ "node", "./dist/apps/node-vless/main.js" ]
|
||||
339
LICENSE
@@ -1,339 +0,0 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
14
README.md
@@ -1,13 +1,3 @@
|
||||
# Edge Tunnel(Beta)
|
||||
Delete code, but keep the project for the sake of memories. I'm only create this project for fun, for try new things and for learn by doing. **I'm even not write any outside marketing post for this project. Just for my own fun...** But I feel emotional damage by the community.
|
||||
|
||||
Running **V2ray** in the edge/serverless runtime.
|
||||
|
||||
# Documentation
|
||||
|
||||
**!!If your find project can't use, please check the your deploy page and rescan the QRcode!!!!**
|
||||
|
||||
https://edgetunnel.114567.xyz/
|
||||
|
||||
# Feedback
|
||||
|
||||
If you have any questions, please open GitHub issue or use https://t.me/edgetunnel for communication.
|
||||
删除代码。为了回忆保留项目。我只是出于娱乐、尝试新事物和学习的目的创建这个项目。我甚至没有为这个项目撰写任何外部营销文章。只是为了我自己的乐趣... 但是,我感到受到社区的情感伤害。
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"extends": ["plugin:@nx/react", "../../.eslintrc.json"],
|
||||
"ignorePatterns": ["!**/*"],
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
"files": ["*.ts", "*.tsx"],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
"files": ["*.js", "*.jsx"],
|
||||
"rules": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Edge Tunnel VLESS CF</title>
|
||||
<base href="/" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
|
||||
<link rel="stylesheet" href="/src/styles.css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/src/main.tsx"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,15 +0,0 @@
|
||||
const { join } = require('path');
|
||||
|
||||
// Note: If you use library-specific PostCSS/Tailwind configuration then you should remove the `postcssConfig` build
|
||||
// option from your application's configuration (i.e. project.json).
|
||||
//
|
||||
// See: https://nx.dev/guides/using-tailwind-css-in-react#step-4:-applying-configuration-to-libraries
|
||||
|
||||
module.exports = {
|
||||
plugins: {
|
||||
tailwindcss: {
|
||||
config: join(__dirname, 'tailwind.config.js'),
|
||||
},
|
||||
autoprefixer: {},
|
||||
},
|
||||
};
|
||||
@@ -1,63 +0,0 @@
|
||||
{
|
||||
"name": "cf-page-vless",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "apps/cf-page-vless/src",
|
||||
"projectType": "application",
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nx/vite:build",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"defaultConfiguration": "production",
|
||||
"options": {
|
||||
"outputPath": "dist/apps/cf-page-vless"
|
||||
},
|
||||
"configurations": {
|
||||
"development": {
|
||||
"mode": "development"
|
||||
},
|
||||
"production": {
|
||||
"mode": "production"
|
||||
}
|
||||
}
|
||||
},
|
||||
"serve": {
|
||||
"executor": "@nx/vite:dev-server",
|
||||
"defaultConfiguration": "development",
|
||||
"options": {
|
||||
"buildTarget": "cf-page-vless:build"
|
||||
},
|
||||
"configurations": {
|
||||
"development": {
|
||||
"buildTarget": "cf-page-vless:build:development",
|
||||
"hmr": true
|
||||
},
|
||||
"production": {
|
||||
"buildTarget": "cf-page-vless:build:production",
|
||||
"hmr": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"serve-cf-page": {
|
||||
"executor": "nx:run-commands",
|
||||
"options": {
|
||||
"command": "wrangler pages dev dist/apps/cf-page-vless"
|
||||
},
|
||||
"dependsOn": ["^build"]
|
||||
},
|
||||
"test": {
|
||||
"executor": "@nx/vite:test",
|
||||
"outputs": ["{projectRoot}/coverage"],
|
||||
"options": {
|
||||
"passWithNoTests": true
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nx/linter:eslint",
|
||||
"outputs": ["{options.outputFile}"],
|
||||
"options": {
|
||||
"lintFilePatterns": ["apps/cf-page-vless/**/*.{ts,tsx,js,jsx}"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": []
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>401 - UUID Not Valid</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1 style="color: red">Not set valid UUID in Environment Variables.</h1>
|
||||
<h2>
|
||||
Please use tool to generate and
|
||||
<span style="color: red">remember</span> UUID or use this one
|
||||
<span style="color: blue" id="uuidSpan"></span>
|
||||
</h2>
|
||||
<h3>
|
||||
You must use same UUID for login this page after config valid UUID
|
||||
Environment Variables
|
||||
</h3>
|
||||
<h2>
|
||||
Please refer to
|
||||
<a
|
||||
href="https://edgetunnel.114567.xyz/guide/cf-pages.html#%E5%A1%AB%E5%86%99-pages-build-%E4%BF%A1%E6%81%AF"
|
||||
>deno deploy guide</a
|
||||
>
|
||||
</h2>
|
||||
<script>
|
||||
let uuid = URL.createObjectURL(new Blob([])).substr(-36);
|
||||
document.getElementById('uuidSpan').textContent = uuid;
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
Before Width: | Height: | Size: 15 KiB |
@@ -1 +0,0 @@
|
||||
/* Your styles goes here. */
|
||||
@@ -1,17 +0,0 @@
|
||||
import { render } from '@testing-library/react';
|
||||
|
||||
import App from './app';
|
||||
|
||||
describe('App', () => {
|
||||
it('should render successfully', () => {
|
||||
const { baseElement } = render(<App />);
|
||||
|
||||
expect(baseElement).toBeTruthy();
|
||||
});
|
||||
|
||||
it('should have a greeting as the title', () => {
|
||||
const { getByText } = render(<App />);
|
||||
|
||||
expect(getByText(/Welcome cf-page/gi)).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -1,12 +0,0 @@
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
import styles from './app.module.css';
|
||||
|
||||
export function App() {
|
||||
return (
|
||||
<>
|
||||
<div />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default App;
|
||||
@@ -1,14 +0,0 @@
|
||||
import { StrictMode } from 'react';
|
||||
import * as ReactDOM from 'react-dom/client';
|
||||
|
||||
// import App from './app/app';
|
||||
import { EdgeApp } from 'edge-ui';
|
||||
|
||||
const root = ReactDOM.createRoot(
|
||||
document.getElementById('root') as HTMLElement
|
||||
);
|
||||
root.render(
|
||||
<StrictMode>
|
||||
<EdgeApp />
|
||||
</StrictMode>
|
||||
);
|
||||
@@ -1,4 +0,0 @@
|
||||
@tailwind components;
|
||||
@tailwind base;
|
||||
@tailwind utilities;
|
||||
/* You can add global styles to this file, and also import other style files */
|
||||
@@ -1,18 +0,0 @@
|
||||
const { createGlobPatternsForDependencies } = require('@nx/react/tailwind');
|
||||
const { join } = require('path');
|
||||
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
module.exports = {
|
||||
content: [
|
||||
join(
|
||||
__dirname,
|
||||
'{src,pages,components}/**/*!(*.stories|*.spec).{ts,tsx,html}'
|
||||
),
|
||||
...createGlobPatternsForDependencies(__dirname),
|
||||
'libs/edge-ui/src/lib/*.tsx',
|
||||
],
|
||||
theme: {
|
||||
extend: {},
|
||||
},
|
||||
plugins: [],
|
||||
};
|
||||
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../dist/out-tsc",
|
||||
"types": ["node"]
|
||||
},
|
||||
"files": [
|
||||
"../../node_modules/@nx/react/typings/cssmodule.d.ts",
|
||||
"../../node_modules/@nx/react/typings/image.d.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"src/**/*.spec.ts",
|
||||
"src/**/*.test.ts",
|
||||
"src/**/*.spec.tsx",
|
||||
"src/**/*.test.tsx",
|
||||
"src/**/*.spec.js",
|
||||
"src/**/*.test.js",
|
||||
"src/**/*.spec.jsx",
|
||||
"src/**/*.test.jsx"
|
||||
],
|
||||
"include": ["src/**/*.js", "src/**/*.jsx", "src/**/*.ts", "src/**/*.tsx"]
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"jsx": "react-jsx",
|
||||
"allowJs": false,
|
||||
"esModuleInterop": false,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"strict": true,
|
||||
"types": ["vite/client"]
|
||||
},
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.app.json"
|
||||
},
|
||||
{
|
||||
"path": "./tsconfig.spec.json"
|
||||
}
|
||||
],
|
||||
"extends": "../../tsconfig.base.json"
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../dist/out-tsc",
|
||||
"types": ["vitest/globals", "node"]
|
||||
},
|
||||
"include": [
|
||||
"vite.config.ts",
|
||||
"src/**/*.test.ts",
|
||||
"src/**/*.spec.ts",
|
||||
"src/**/*.test.tsx",
|
||||
"src/**/*.spec.tsx",
|
||||
"src/**/*.test.js",
|
||||
"src/**/*.spec.js",
|
||||
"src/**/*.test.jsx",
|
||||
"src/**/*.spec.jsx",
|
||||
"src/**/*.d.ts"
|
||||
],
|
||||
"files": [
|
||||
"../../node_modules/@nx/react/typings/cssmodule.d.ts",
|
||||
"../../node_modules/@nx/react/typings/image.d.ts"
|
||||
]
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
/// <reference types="vitest" />
|
||||
import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
import viteTsConfigPaths from 'vite-tsconfig-paths';
|
||||
|
||||
export default defineConfig({
|
||||
server: {
|
||||
port: 4200,
|
||||
host: 'localhost',
|
||||
},
|
||||
plugins: [
|
||||
react(),
|
||||
viteTsConfigPaths({
|
||||
root: '../../',
|
||||
}),
|
||||
],
|
||||
|
||||
test: {
|
||||
globals: true,
|
||||
cache: {
|
||||
dir: '../../node_modules/.vitest',
|
||||
},
|
||||
environment: 'jsdom',
|
||||
include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
|
||||
},
|
||||
});
|
||||
@@ -1,975 +0,0 @@
|
||||
// deno-fmt-ignore-file
|
||||
// deno-lint-ignore-file
|
||||
// This code was bundled using `deno bundle` and it's not recommended to edit it manually
|
||||
|
||||
function deferred() {
|
||||
let methods;
|
||||
let state = "pending";
|
||||
const promise = new Promise((resolve, reject)=>{
|
||||
methods = {
|
||||
async resolve (value) {
|
||||
await value;
|
||||
state = "fulfilled";
|
||||
resolve(value);
|
||||
},
|
||||
reject (reason) {
|
||||
state = "rejected";
|
||||
reject(reason);
|
||||
}
|
||||
};
|
||||
});
|
||||
Object.defineProperty(promise, "state", {
|
||||
get: ()=>state
|
||||
});
|
||||
return Object.assign(promise, methods);
|
||||
}
|
||||
function delay(ms, options = {}) {
|
||||
const { signal , persistent } = options;
|
||||
if (signal?.aborted) {
|
||||
return Promise.reject(new DOMException("Delay was aborted.", "AbortError"));
|
||||
}
|
||||
return new Promise((resolve, reject)=>{
|
||||
const abort = ()=>{
|
||||
clearTimeout(i);
|
||||
reject(new DOMException("Delay was aborted.", "AbortError"));
|
||||
};
|
||||
const done = ()=>{
|
||||
signal?.removeEventListener("abort", abort);
|
||||
resolve();
|
||||
};
|
||||
const i = setTimeout(done, ms);
|
||||
signal?.addEventListener("abort", abort, {
|
||||
once: true
|
||||
});
|
||||
if (persistent === false) {
|
||||
try {
|
||||
Deno.unrefTimer(i);
|
||||
} catch (error) {
|
||||
if (!(error instanceof ReferenceError)) {
|
||||
throw error;
|
||||
}
|
||||
console.error("`persistent` option is only available in Deno");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
class MuxAsyncIterator {
|
||||
#iteratorCount = 0;
|
||||
#yields = [];
|
||||
#throws = [];
|
||||
#signal = deferred();
|
||||
add(iterable) {
|
||||
++this.#iteratorCount;
|
||||
this.#callIteratorNext(iterable[Symbol.asyncIterator]());
|
||||
}
|
||||
async #callIteratorNext(iterator) {
|
||||
try {
|
||||
const { value , done } = await iterator.next();
|
||||
if (done) {
|
||||
--this.#iteratorCount;
|
||||
} else {
|
||||
this.#yields.push({
|
||||
iterator,
|
||||
value
|
||||
});
|
||||
}
|
||||
} catch (e) {
|
||||
this.#throws.push(e);
|
||||
}
|
||||
this.#signal.resolve();
|
||||
}
|
||||
async *iterate() {
|
||||
while(this.#iteratorCount > 0){
|
||||
await this.#signal;
|
||||
for(let i = 0; i < this.#yields.length; i++){
|
||||
const { iterator , value } = this.#yields[i];
|
||||
yield value;
|
||||
this.#callIteratorNext(iterator);
|
||||
}
|
||||
if (this.#throws.length) {
|
||||
for (const e of this.#throws){
|
||||
throw e;
|
||||
}
|
||||
this.#throws.length = 0;
|
||||
}
|
||||
this.#yields.length = 0;
|
||||
this.#signal = deferred();
|
||||
}
|
||||
}
|
||||
[Symbol.asyncIterator]() {
|
||||
return this.iterate();
|
||||
}
|
||||
}
|
||||
const ERROR_SERVER_CLOSED = "Server closed";
|
||||
const INITIAL_ACCEPT_BACKOFF_DELAY = 5;
|
||||
const MAX_ACCEPT_BACKOFF_DELAY = 1000;
|
||||
class Server {
|
||||
#port;
|
||||
#host;
|
||||
#handler;
|
||||
#closed = false;
|
||||
#listeners = new Set();
|
||||
#acceptBackoffDelayAbortController = new AbortController();
|
||||
#httpConnections = new Set();
|
||||
#onError;
|
||||
constructor(serverInit){
|
||||
this.#port = serverInit.port;
|
||||
this.#host = serverInit.hostname;
|
||||
this.#handler = serverInit.handler;
|
||||
this.#onError = serverInit.onError ?? function(error) {
|
||||
console.error(error);
|
||||
return new Response("Internal Server Error", {
|
||||
status: 500
|
||||
});
|
||||
};
|
||||
}
|
||||
async serve(listener) {
|
||||
if (this.#closed) {
|
||||
throw new Deno.errors.Http(ERROR_SERVER_CLOSED);
|
||||
}
|
||||
this.#trackListener(listener);
|
||||
try {
|
||||
return await this.#accept(listener);
|
||||
} finally{
|
||||
this.#untrackListener(listener);
|
||||
try {
|
||||
listener.close();
|
||||
} catch {}
|
||||
}
|
||||
}
|
||||
async listenAndServe() {
|
||||
if (this.#closed) {
|
||||
throw new Deno.errors.Http(ERROR_SERVER_CLOSED);
|
||||
}
|
||||
const listener = Deno.listen({
|
||||
port: this.#port ?? 80,
|
||||
hostname: this.#host ?? "0.0.0.0",
|
||||
transport: "tcp"
|
||||
});
|
||||
return await this.serve(listener);
|
||||
}
|
||||
async listenAndServeTls(certFile, keyFile) {
|
||||
if (this.#closed) {
|
||||
throw new Deno.errors.Http(ERROR_SERVER_CLOSED);
|
||||
}
|
||||
const listener = Deno.listenTls({
|
||||
port: this.#port ?? 443,
|
||||
hostname: this.#host ?? "0.0.0.0",
|
||||
certFile,
|
||||
keyFile,
|
||||
transport: "tcp"
|
||||
});
|
||||
return await this.serve(listener);
|
||||
}
|
||||
close() {
|
||||
if (this.#closed) {
|
||||
throw new Deno.errors.Http(ERROR_SERVER_CLOSED);
|
||||
}
|
||||
this.#closed = true;
|
||||
for (const listener of this.#listeners){
|
||||
try {
|
||||
listener.close();
|
||||
} catch {}
|
||||
}
|
||||
this.#listeners.clear();
|
||||
this.#acceptBackoffDelayAbortController.abort();
|
||||
for (const httpConn of this.#httpConnections){
|
||||
this.#closeHttpConn(httpConn);
|
||||
}
|
||||
this.#httpConnections.clear();
|
||||
}
|
||||
get closed() {
|
||||
return this.#closed;
|
||||
}
|
||||
get addrs() {
|
||||
return Array.from(this.#listeners).map((listener)=>listener.addr);
|
||||
}
|
||||
async #respond(requestEvent, connInfo) {
|
||||
let response;
|
||||
try {
|
||||
response = await this.#handler(requestEvent.request, connInfo);
|
||||
if (response.bodyUsed && response.body !== null) {
|
||||
throw new TypeError("Response body already consumed.");
|
||||
}
|
||||
} catch (error) {
|
||||
response = await this.#onError(error);
|
||||
}
|
||||
try {
|
||||
await requestEvent.respondWith(response);
|
||||
} catch {}
|
||||
}
|
||||
async #serveHttp(httpConn, connInfo1) {
|
||||
while(!this.#closed){
|
||||
let requestEvent;
|
||||
try {
|
||||
requestEvent = await httpConn.nextRequest();
|
||||
} catch {
|
||||
break;
|
||||
}
|
||||
if (requestEvent === null) {
|
||||
break;
|
||||
}
|
||||
this.#respond(requestEvent, connInfo1);
|
||||
}
|
||||
this.#closeHttpConn(httpConn);
|
||||
}
|
||||
async #accept(listener) {
|
||||
let acceptBackoffDelay;
|
||||
while(!this.#closed){
|
||||
let conn;
|
||||
try {
|
||||
conn = await listener.accept();
|
||||
} catch (error) {
|
||||
if (error instanceof Deno.errors.BadResource || error instanceof Deno.errors.InvalidData || error instanceof Deno.errors.UnexpectedEof || error instanceof Deno.errors.ConnectionReset || error instanceof Deno.errors.NotConnected) {
|
||||
if (!acceptBackoffDelay) {
|
||||
acceptBackoffDelay = INITIAL_ACCEPT_BACKOFF_DELAY;
|
||||
} else {
|
||||
acceptBackoffDelay *= 2;
|
||||
}
|
||||
if (acceptBackoffDelay >= 1000) {
|
||||
acceptBackoffDelay = MAX_ACCEPT_BACKOFF_DELAY;
|
||||
}
|
||||
try {
|
||||
await delay(acceptBackoffDelay, {
|
||||
signal: this.#acceptBackoffDelayAbortController.signal
|
||||
});
|
||||
} catch (err) {
|
||||
if (!(err instanceof DOMException && err.name === "AbortError")) {
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
continue;
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
acceptBackoffDelay = undefined;
|
||||
let httpConn;
|
||||
try {
|
||||
httpConn = Deno.serveHttp(conn);
|
||||
} catch {
|
||||
continue;
|
||||
}
|
||||
this.#trackHttpConnection(httpConn);
|
||||
const connInfo = {
|
||||
localAddr: conn.localAddr,
|
||||
remoteAddr: conn.remoteAddr
|
||||
};
|
||||
this.#serveHttp(httpConn, connInfo);
|
||||
}
|
||||
}
|
||||
#closeHttpConn(httpConn1) {
|
||||
this.#untrackHttpConnection(httpConn1);
|
||||
try {
|
||||
httpConn1.close();
|
||||
} catch {}
|
||||
}
|
||||
#trackListener(listener1) {
|
||||
this.#listeners.add(listener1);
|
||||
}
|
||||
#untrackListener(listener2) {
|
||||
this.#listeners.delete(listener2);
|
||||
}
|
||||
#trackHttpConnection(httpConn2) {
|
||||
this.#httpConnections.add(httpConn2);
|
||||
}
|
||||
#untrackHttpConnection(httpConn3) {
|
||||
this.#httpConnections.delete(httpConn3);
|
||||
}
|
||||
}
|
||||
function hostnameForDisplay(hostname) {
|
||||
return hostname === "0.0.0.0" ? "localhost" : hostname;
|
||||
}
|
||||
async function serve(handler, options = {}) {
|
||||
let port = options.port ?? 8000;
|
||||
const hostname = options.hostname ?? "0.0.0.0";
|
||||
const server = new Server({
|
||||
port,
|
||||
hostname,
|
||||
handler,
|
||||
onError: options.onError
|
||||
});
|
||||
options?.signal?.addEventListener("abort", ()=>server.close(), {
|
||||
once: true
|
||||
});
|
||||
const s = server.listenAndServe();
|
||||
port = server.addrs[0].port;
|
||||
if ("onListen" in options) {
|
||||
options.onListen?.({
|
||||
port,
|
||||
hostname
|
||||
});
|
||||
} else {
|
||||
console.log(`Listening on http://${hostnameForDisplay(hostname)}:${port}/`);
|
||||
}
|
||||
return await s;
|
||||
}
|
||||
new Uint8Array(16);
|
||||
var REGEX = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
|
||||
function validate(uuid) {
|
||||
return typeof uuid === 'string' && REGEX.test(uuid);
|
||||
}
|
||||
const byteToHex = [];
|
||||
for(let i = 0; i < 256; ++i){
|
||||
byteToHex.push((i + 0x100).toString(16).slice(1));
|
||||
}
|
||||
function unsafeStringify(arr, offset = 0) {
|
||||
return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
|
||||
}
|
||||
function stringify(arr, offset = 0) {
|
||||
const uuid = unsafeStringify(arr, offset);
|
||||
if (!validate(uuid)) {
|
||||
throw TypeError('Stringified UUID is invalid');
|
||||
}
|
||||
return uuid;
|
||||
}
|
||||
function parse(uuid) {
|
||||
if (!validate(uuid)) {
|
||||
throw TypeError('Invalid UUID');
|
||||
}
|
||||
let v;
|
||||
const arr = new Uint8Array(16);
|
||||
arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;
|
||||
arr[1] = v >>> 16 & 0xff;
|
||||
arr[2] = v >>> 8 & 0xff;
|
||||
arr[3] = v & 0xff;
|
||||
arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;
|
||||
arr[5] = v & 0xff;
|
||||
arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;
|
||||
arr[7] = v & 0xff;
|
||||
arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;
|
||||
arr[9] = v & 0xff;
|
||||
arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;
|
||||
arr[11] = v / 0x100000000 & 0xff;
|
||||
arr[12] = v >>> 24 & 0xff;
|
||||
arr[13] = v >>> 16 & 0xff;
|
||||
arr[14] = v >>> 8 & 0xff;
|
||||
arr[15] = v & 0xff;
|
||||
return arr;
|
||||
}
|
||||
function stringToBytes(str) {
|
||||
str = unescape(encodeURIComponent(str));
|
||||
const bytes = [];
|
||||
for(let i = 0; i < str.length; ++i){
|
||||
bytes.push(str.charCodeAt(i));
|
||||
}
|
||||
return bytes;
|
||||
}
|
||||
const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';
|
||||
const URL1 = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';
|
||||
function v35(name, version, hashfunc) {
|
||||
function generateUUID(value, namespace, buf, offset) {
|
||||
var _namespace;
|
||||
if (typeof value === 'string') {
|
||||
value = stringToBytes(value);
|
||||
}
|
||||
if (typeof namespace === 'string') {
|
||||
namespace = parse(namespace);
|
||||
}
|
||||
if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) {
|
||||
throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');
|
||||
}
|
||||
let bytes = new Uint8Array(16 + value.length);
|
||||
bytes.set(namespace);
|
||||
bytes.set(value, namespace.length);
|
||||
bytes = hashfunc(bytes);
|
||||
bytes[6] = bytes[6] & 0x0f | version;
|
||||
bytes[8] = bytes[8] & 0x3f | 0x80;
|
||||
if (buf) {
|
||||
offset = offset || 0;
|
||||
for(let i = 0; i < 16; ++i){
|
||||
buf[offset + i] = bytes[i];
|
||||
}
|
||||
return buf;
|
||||
}
|
||||
return unsafeStringify(bytes);
|
||||
}
|
||||
try {
|
||||
generateUUID.name = name;
|
||||
} catch (err) {}
|
||||
generateUUID.DNS = DNS;
|
||||
generateUUID.URL = URL1;
|
||||
return generateUUID;
|
||||
}
|
||||
function md5(bytes) {
|
||||
if (typeof bytes === 'string') {
|
||||
const msg = unescape(encodeURIComponent(bytes));
|
||||
bytes = new Uint8Array(msg.length);
|
||||
for(let i = 0; i < msg.length; ++i){
|
||||
bytes[i] = msg.charCodeAt(i);
|
||||
}
|
||||
}
|
||||
return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));
|
||||
}
|
||||
function md5ToHexEncodedArray(input) {
|
||||
const output = [];
|
||||
const length32 = input.length * 32;
|
||||
const hexTab = '0123456789abcdef';
|
||||
for(let i = 0; i < length32; i += 8){
|
||||
const x = input[i >> 5] >>> i % 32 & 0xff;
|
||||
const hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);
|
||||
output.push(hex);
|
||||
}
|
||||
return output;
|
||||
}
|
||||
function getOutputLength(inputLength8) {
|
||||
return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;
|
||||
}
|
||||
function wordsToMd5(x, len) {
|
||||
x[len >> 5] |= 0x80 << len % 32;
|
||||
x[getOutputLength(len) - 1] = len;
|
||||
let a = 1732584193;
|
||||
let b = -271733879;
|
||||
let c = -1732584194;
|
||||
let d = 271733878;
|
||||
for(let i = 0; i < x.length; i += 16){
|
||||
const olda = a;
|
||||
const oldb = b;
|
||||
const oldc = c;
|
||||
const oldd = d;
|
||||
a = md5ff(a, b, c, d, x[i], 7, -680876936);
|
||||
d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);
|
||||
c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);
|
||||
b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);
|
||||
a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);
|
||||
d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);
|
||||
c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);
|
||||
b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);
|
||||
a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);
|
||||
d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);
|
||||
c = md5ff(c, d, a, b, x[i + 10], 17, -42063);
|
||||
b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);
|
||||
a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);
|
||||
d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);
|
||||
c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);
|
||||
b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);
|
||||
a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);
|
||||
d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);
|
||||
c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);
|
||||
b = md5gg(b, c, d, a, x[i], 20, -373897302);
|
||||
a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);
|
||||
d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);
|
||||
c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);
|
||||
b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);
|
||||
a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);
|
||||
d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);
|
||||
c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);
|
||||
b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);
|
||||
a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);
|
||||
d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);
|
||||
c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);
|
||||
b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);
|
||||
a = md5hh(a, b, c, d, x[i + 5], 4, -378558);
|
||||
d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);
|
||||
c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);
|
||||
b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);
|
||||
a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);
|
||||
d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);
|
||||
c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);
|
||||
b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);
|
||||
a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);
|
||||
d = md5hh(d, a, b, c, x[i], 11, -358537222);
|
||||
c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);
|
||||
b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);
|
||||
a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);
|
||||
d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);
|
||||
c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);
|
||||
b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);
|
||||
a = md5ii(a, b, c, d, x[i], 6, -198630844);
|
||||
d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);
|
||||
c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);
|
||||
b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);
|
||||
a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);
|
||||
d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);
|
||||
c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);
|
||||
b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);
|
||||
a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);
|
||||
d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);
|
||||
c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);
|
||||
b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);
|
||||
a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);
|
||||
d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);
|
||||
c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);
|
||||
b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);
|
||||
a = safeAdd(a, olda);
|
||||
b = safeAdd(b, oldb);
|
||||
c = safeAdd(c, oldc);
|
||||
d = safeAdd(d, oldd);
|
||||
}
|
||||
return [
|
||||
a,
|
||||
b,
|
||||
c,
|
||||
d
|
||||
];
|
||||
}
|
||||
function bytesToWords(input) {
|
||||
if (input.length === 0) {
|
||||
return [];
|
||||
}
|
||||
const length8 = input.length * 8;
|
||||
const output = new Uint32Array(getOutputLength(length8));
|
||||
for(let i = 0; i < length8; i += 8){
|
||||
output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;
|
||||
}
|
||||
return output;
|
||||
}
|
||||
function safeAdd(x, y) {
|
||||
const lsw = (x & 0xffff) + (y & 0xffff);
|
||||
const msw = (x >> 16) + (y >> 16) + (lsw >> 16);
|
||||
return msw << 16 | lsw & 0xffff;
|
||||
}
|
||||
function bitRotateLeft(num, cnt) {
|
||||
return num << cnt | num >>> 32 - cnt;
|
||||
}
|
||||
function md5cmn(q, a, b, x, s, t) {
|
||||
return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);
|
||||
}
|
||||
function md5ff(a, b, c, d, x, s, t) {
|
||||
return md5cmn(b & c | ~b & d, a, b, x, s, t);
|
||||
}
|
||||
function md5gg(a, b, c, d, x, s, t) {
|
||||
return md5cmn(b & d | c & ~d, a, b, x, s, t);
|
||||
}
|
||||
function md5hh(a, b, c, d, x, s, t) {
|
||||
return md5cmn(b ^ c ^ d, a, b, x, s, t);
|
||||
}
|
||||
function md5ii(a, b, c, d, x, s, t) {
|
||||
return md5cmn(c ^ (b | ~d), a, b, x, s, t);
|
||||
}
|
||||
v35('v3', 0x30, md5);
|
||||
typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
||||
function f(s, x, y, z) {
|
||||
switch(s){
|
||||
case 0:
|
||||
return x & y ^ ~x & z;
|
||||
case 1:
|
||||
return x ^ y ^ z;
|
||||
case 2:
|
||||
return x & y ^ x & z ^ y & z;
|
||||
case 3:
|
||||
return x ^ y ^ z;
|
||||
}
|
||||
}
|
||||
function ROTL(x, n) {
|
||||
return x << n | x >>> 32 - n;
|
||||
}
|
||||
function sha1(bytes) {
|
||||
const K = [
|
||||
0x5a827999,
|
||||
0x6ed9eba1,
|
||||
0x8f1bbcdc,
|
||||
0xca62c1d6
|
||||
];
|
||||
const H = [
|
||||
0x67452301,
|
||||
0xefcdab89,
|
||||
0x98badcfe,
|
||||
0x10325476,
|
||||
0xc3d2e1f0
|
||||
];
|
||||
if (typeof bytes === 'string') {
|
||||
const msg = unescape(encodeURIComponent(bytes));
|
||||
bytes = [];
|
||||
for(let i = 0; i < msg.length; ++i){
|
||||
bytes.push(msg.charCodeAt(i));
|
||||
}
|
||||
} else if (!Array.isArray(bytes)) {
|
||||
bytes = Array.prototype.slice.call(bytes);
|
||||
}
|
||||
bytes.push(0x80);
|
||||
const l = bytes.length / 4 + 2;
|
||||
const N = Math.ceil(l / 16);
|
||||
const M = new Array(N);
|
||||
for(let i = 0; i < N; ++i){
|
||||
const arr = new Uint32Array(16);
|
||||
for(let j = 0; j < 16; ++j){
|
||||
arr[j] = bytes[i * 64 + j * 4] << 24 | bytes[i * 64 + j * 4 + 1] << 16 | bytes[i * 64 + j * 4 + 2] << 8 | bytes[i * 64 + j * 4 + 3];
|
||||
}
|
||||
M[i] = arr;
|
||||
}
|
||||
M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);
|
||||
M[N - 1][14] = Math.floor(M[N - 1][14]);
|
||||
M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;
|
||||
for(let i = 0; i < N; ++i){
|
||||
const W = new Uint32Array(80);
|
||||
for(let t = 0; t < 16; ++t){
|
||||
W[t] = M[i][t];
|
||||
}
|
||||
for(let t = 16; t < 80; ++t){
|
||||
W[t] = ROTL(W[t - 3] ^ W[t - 8] ^ W[t - 14] ^ W[t - 16], 1);
|
||||
}
|
||||
let a = H[0];
|
||||
let b = H[1];
|
||||
let c = H[2];
|
||||
let d = H[3];
|
||||
let e = H[4];
|
||||
for(let t = 0; t < 80; ++t){
|
||||
const s = Math.floor(t / 20);
|
||||
const T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[t] >>> 0;
|
||||
e = d;
|
||||
d = c;
|
||||
c = ROTL(b, 30) >>> 0;
|
||||
b = a;
|
||||
a = T;
|
||||
}
|
||||
H[0] = H[0] + a >>> 0;
|
||||
H[1] = H[1] + b >>> 0;
|
||||
H[2] = H[2] + c >>> 0;
|
||||
H[3] = H[3] + d >>> 0;
|
||||
H[4] = H[4] + e >>> 0;
|
||||
}
|
||||
return [
|
||||
H[0] >> 24 & 0xff,
|
||||
H[0] >> 16 & 0xff,
|
||||
H[0] >> 8 & 0xff,
|
||||
H[0] & 0xff,
|
||||
H[1] >> 24 & 0xff,
|
||||
H[1] >> 16 & 0xff,
|
||||
H[1] >> 8 & 0xff,
|
||||
H[1] & 0xff,
|
||||
H[2] >> 24 & 0xff,
|
||||
H[2] >> 16 & 0xff,
|
||||
H[2] >> 8 & 0xff,
|
||||
H[2] & 0xff,
|
||||
H[3] >> 24 & 0xff,
|
||||
H[3] >> 16 & 0xff,
|
||||
H[3] >> 8 & 0xff,
|
||||
H[3] & 0xff,
|
||||
H[4] >> 24 & 0xff,
|
||||
H[4] >> 16 & 0xff,
|
||||
H[4] >> 8 & 0xff,
|
||||
H[4] & 0xff
|
||||
];
|
||||
}
|
||||
v35('v5', 0x50, sha1);
|
||||
async function serveClient(req, basePath) {
|
||||
const url = new URL(req.url);
|
||||
if (url.pathname.startsWith('/assets') || url.pathname.includes(basePath)) {
|
||||
let targetUrl = `https://raw.githubusercontent.com/zizifn/edgetunnel/main/dist/apps/cf-page${url.pathname}`;
|
||||
if (url.pathname.includes(basePath)) {
|
||||
targetUrl = `https://raw.githubusercontent.com/zizifn/edgetunnel/main/dist/apps/cf-page/index.html`;
|
||||
}
|
||||
console.log(targetUrl);
|
||||
const resp = await fetch(targetUrl);
|
||||
const modifiedHeaders = new Headers(resp.headers);
|
||||
modifiedHeaders.delete('content-security-policy');
|
||||
if (url.pathname.endsWith('.js')) {
|
||||
modifiedHeaders.set('content-type', 'application/javascript');
|
||||
} else if (url.pathname.endsWith('.css')) {
|
||||
modifiedHeaders.set('content-type', 'text/css');
|
||||
} else if (url.pathname.includes(basePath)) {
|
||||
modifiedHeaders.set('content-type', 'text/html; charset=utf-8');
|
||||
}
|
||||
return new Response(resp.body, {
|
||||
status: resp.status,
|
||||
headers: modifiedHeaders
|
||||
});
|
||||
}
|
||||
const basicAuth = req.headers.get('Authorization') || '';
|
||||
const authString = basicAuth.split(' ')?.[1] || '';
|
||||
if (atob(authString).includes(basePath)) {
|
||||
console.log('302');
|
||||
return new Response(``, {
|
||||
status: 302,
|
||||
headers: {
|
||||
'content-type': 'text/html; charset=utf-8',
|
||||
Location: `./${basePath}`
|
||||
}
|
||||
});
|
||||
} else {
|
||||
return new Response(``, {
|
||||
status: 401,
|
||||
headers: {
|
||||
'content-type': 'text/html; charset=utf-8',
|
||||
'WWW-Authenticate': 'Basic'
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function delay1(ms) {
|
||||
return new Promise((resolve, rej)=>{
|
||||
setTimeout(resolve, ms);
|
||||
});
|
||||
}
|
||||
function makeReadableWebSocketStream(ws, earlyDataHeader, log) {
|
||||
let readableStreamCancel = false;
|
||||
return new ReadableStream({
|
||||
start (controller) {
|
||||
ws.addEventListener('message', async (e)=>{
|
||||
if (readableStreamCancel) {
|
||||
return;
|
||||
}
|
||||
const vlessBuffer = e.data;
|
||||
controller.enqueue(vlessBuffer);
|
||||
});
|
||||
ws.addEventListener('error', (e)=>{
|
||||
log('socket has error');
|
||||
readableStreamCancel = true;
|
||||
controller.error(e);
|
||||
});
|
||||
ws.addEventListener('close', ()=>{
|
||||
try {
|
||||
log('webSocket is close');
|
||||
if (readableStreamCancel) {
|
||||
return;
|
||||
}
|
||||
controller.close();
|
||||
} catch (error) {
|
||||
log(`websocketStream can't close DUE to `, error);
|
||||
}
|
||||
});
|
||||
const { earlyData , error } = base64ToArrayBuffer(earlyDataHeader);
|
||||
if (error) {
|
||||
log(`earlyDataHeader has invaild base64`);
|
||||
closeWebSocket(ws);
|
||||
return;
|
||||
}
|
||||
if (earlyData) {
|
||||
controller.enqueue(earlyData);
|
||||
}
|
||||
},
|
||||
pull (controller) {},
|
||||
cancel (reason) {
|
||||
log(`websocketStream is cancel DUE to `, reason);
|
||||
if (readableStreamCancel) {
|
||||
return;
|
||||
}
|
||||
readableStreamCancel = true;
|
||||
closeWebSocket(ws);
|
||||
}
|
||||
});
|
||||
}
|
||||
function base64ToArrayBuffer(base64Str) {
|
||||
if (!base64Str) {
|
||||
return {
|
||||
error: null
|
||||
};
|
||||
}
|
||||
try {
|
||||
base64Str = base64Str.replace(/-/g, '+').replace(/_/g, '/');
|
||||
const decode = atob(base64Str);
|
||||
const arryBuffer = Uint8Array.from(decode, (c)=>c.charCodeAt(0));
|
||||
return {
|
||||
earlyData: arryBuffer.buffer,
|
||||
error: null
|
||||
};
|
||||
} catch (error) {
|
||||
return {
|
||||
error
|
||||
};
|
||||
}
|
||||
}
|
||||
function closeWebSocket(socket) {
|
||||
if (socket.readyState === socket.OPEN) {
|
||||
socket.close();
|
||||
}
|
||||
}
|
||||
function processVlessHeader(vlessBuffer, userID) {
|
||||
if (vlessBuffer.byteLength < 24) {
|
||||
return {
|
||||
hasError: true,
|
||||
message: 'invalid data'
|
||||
};
|
||||
}
|
||||
const version = new Uint8Array(vlessBuffer.slice(0, 1));
|
||||
let isValidUser = false;
|
||||
let isUDP = false;
|
||||
if (stringify(new Uint8Array(vlessBuffer.slice(1, 17))) === userID) {
|
||||
isValidUser = true;
|
||||
}
|
||||
if (!isValidUser) {
|
||||
return {
|
||||
hasError: true,
|
||||
message: 'invalid user'
|
||||
};
|
||||
}
|
||||
const optLength = new Uint8Array(vlessBuffer.slice(17, 18))[0];
|
||||
const command = new Uint8Array(vlessBuffer.slice(18 + optLength, 18 + optLength + 1))[0];
|
||||
if (command === 1) {} else if (command === 2) {
|
||||
isUDP = true;
|
||||
} else {
|
||||
return {
|
||||
hasError: true,
|
||||
message: `command ${command} is not support, command 01-tcp,02-udp,03-mux`
|
||||
};
|
||||
}
|
||||
const portIndex = 18 + optLength + 1;
|
||||
const portBuffer = vlessBuffer.slice(portIndex, portIndex + 2);
|
||||
const portRemote = new DataView(portBuffer).getInt16(0);
|
||||
let addressIndex = portIndex + 2;
|
||||
const addressBuffer = new Uint8Array(vlessBuffer.slice(addressIndex, addressIndex + 1));
|
||||
const addressType = addressBuffer[0];
|
||||
let addressLength = 0;
|
||||
let addressValueIndex = addressIndex + 1;
|
||||
let addressValue = '';
|
||||
switch(addressType){
|
||||
case 1:
|
||||
addressLength = 4;
|
||||
addressValue = new Uint8Array(vlessBuffer.slice(addressValueIndex, addressValueIndex + addressLength)).join('.');
|
||||
break;
|
||||
case 2:
|
||||
addressLength = new Uint8Array(vlessBuffer.slice(addressValueIndex, addressValueIndex + 1))[0];
|
||||
addressValueIndex += 1;
|
||||
addressValue = new TextDecoder().decode(vlessBuffer.slice(addressValueIndex, addressValueIndex + addressLength));
|
||||
break;
|
||||
case 3:
|
||||
addressLength = 16;
|
||||
const dataView = new DataView(vlessBuffer.slice(addressValueIndex, addressValueIndex + addressLength));
|
||||
const ipv6 = [];
|
||||
for(let i = 0; i < 8; i++){
|
||||
ipv6.push(dataView.getUint16(i * 2).toString(16));
|
||||
}
|
||||
addressValue = ipv6.join(':');
|
||||
break;
|
||||
default:
|
||||
console.log(`invild addressType is ${addressType}`);
|
||||
}
|
||||
if (!addressValue) {
|
||||
return {
|
||||
hasError: true,
|
||||
message: `addressValue is empty, addressType is ${addressType}`
|
||||
};
|
||||
}
|
||||
return {
|
||||
hasError: false,
|
||||
addressRemote: addressValue,
|
||||
portRemote,
|
||||
rawDataIndex: addressValueIndex + addressLength,
|
||||
vlessVersion: version,
|
||||
isUDP
|
||||
};
|
||||
}
|
||||
const userID = Deno.env.get('UUID') || '';
|
||||
let isVaildUser = validate(userID);
|
||||
if (!isVaildUser) {
|
||||
console.log('not set valid UUID');
|
||||
}
|
||||
const handler = async (req)=>{
|
||||
if (!isVaildUser) {
|
||||
const index401 = await Deno.readFile(`${Deno.cwd()}/dist/apps/cf-page/401.html`);
|
||||
return new Response(index401, {
|
||||
status: 401,
|
||||
headers: {
|
||||
'content-type': 'text/html; charset=utf-8'
|
||||
}
|
||||
});
|
||||
}
|
||||
const upgrade = req.headers.get('upgrade') || '';
|
||||
if (upgrade.toLowerCase() != 'websocket') {
|
||||
return await serveClient(req, userID);
|
||||
}
|
||||
const { socket , response } = Deno.upgradeWebSocket(req);
|
||||
socket.addEventListener('open', ()=>{});
|
||||
const earlyDataHeader = req.headers.get('sec-websocket-protocol') || '';
|
||||
processWebSocket({
|
||||
userID,
|
||||
webSocket: socket,
|
||||
earlyDataHeader
|
||||
});
|
||||
return response;
|
||||
};
|
||||
async function processWebSocket({ userID , webSocket , earlyDataHeader }) {
|
||||
let address = '';
|
||||
let portWithRandomLog = '';
|
||||
let remoteConnection = null;
|
||||
let remoteConnectionReadyResolve;
|
||||
try {
|
||||
const log = (info, event)=>{
|
||||
console.log(`[${address}:${portWithRandomLog}] ${info}`, event || '');
|
||||
};
|
||||
const readableWebSocketStream = makeReadableWebSocketStream(webSocket, earlyDataHeader, log);
|
||||
let vlessResponseHeader = null;
|
||||
readableWebSocketStream.pipeTo(new WritableStream({
|
||||
async write (chunk, controller) {
|
||||
const vlessBuffer = chunk;
|
||||
if (remoteConnection) {
|
||||
await remoteConnection.write(new Uint8Array(vlessBuffer));
|
||||
return;
|
||||
}
|
||||
const { hasError , message , portRemote , addressRemote , rawDataIndex , vlessVersion , isUDP } = processVlessHeader(vlessBuffer, userID);
|
||||
address = addressRemote || '';
|
||||
portWithRandomLog = `${portRemote}--${Math.random()}`;
|
||||
if (isUDP) {
|
||||
console.log('udp');
|
||||
controller.error(`[${address}:${portWithRandomLog}] command udp is not support `);
|
||||
return;
|
||||
}
|
||||
if (hasError) {
|
||||
controller.error(`[${address}:${portWithRandomLog}] ${message} `);
|
||||
}
|
||||
console.log(`[${address}:${portWithRandomLog}] connecting`);
|
||||
remoteConnection = await Deno.connect({
|
||||
port: portRemote,
|
||||
hostname: address
|
||||
});
|
||||
vlessResponseHeader = new Uint8Array([
|
||||
vlessVersion[0],
|
||||
0
|
||||
]);
|
||||
const rawClientData = vlessBuffer.slice(rawDataIndex);
|
||||
await remoteConnection.write(new Uint8Array(rawClientData));
|
||||
remoteConnectionReadyResolve(remoteConnection);
|
||||
},
|
||||
close () {
|
||||
console.log(`[${address}:${portWithRandomLog}] readableWebSocketStream is close`);
|
||||
},
|
||||
abort (reason) {
|
||||
console.log(`[${address}:${portWithRandomLog}] readableWebSocketStream is abort`, JSON.stringify(reason));
|
||||
}
|
||||
})).catch((error)=>{
|
||||
console.error(`[${address}:${portWithRandomLog}] readableWebSocketStream pipeto has exception`, error.stack || error);
|
||||
});
|
||||
await new Promise((resolve)=>remoteConnectionReadyResolve = resolve);
|
||||
let remoteChunkCount = 0;
|
||||
await remoteConnection.readable.pipeTo(new WritableStream({
|
||||
start () {
|
||||
if (webSocket.readyState === webSocket.OPEN) {
|
||||
webSocket.send(vlessResponseHeader);
|
||||
}
|
||||
},
|
||||
async write (chunk, controller) {
|
||||
function send2WebSocket() {
|
||||
if (webSocket.readyState !== webSocket.OPEN) {
|
||||
controller.error(`can't accept data from remoteConnection!.readable when client webSocket is close early`);
|
||||
return;
|
||||
}
|
||||
webSocket.send(chunk);
|
||||
}
|
||||
remoteChunkCount++;
|
||||
if (remoteChunkCount < 20) {
|
||||
send2WebSocket();
|
||||
} else if (remoteChunkCount < 120) {
|
||||
await delay1(10);
|
||||
send2WebSocket();
|
||||
} else if (remoteChunkCount < 500) {
|
||||
await delay1(20);
|
||||
send2WebSocket();
|
||||
} else {
|
||||
await delay1(50);
|
||||
send2WebSocket();
|
||||
}
|
||||
},
|
||||
close () {
|
||||
console.log(`[${address}:${portWithRandomLog}] remoteConnection!.readable is close`);
|
||||
},
|
||||
abort (reason) {
|
||||
closeWebSocket(webSocket);
|
||||
console.error(`[${address}:${portWithRandomLog}] remoteConnection!.readable abort`, reason);
|
||||
}
|
||||
}));
|
||||
} catch (error) {
|
||||
console.error(`[${address}:${portWithRandomLog}] processWebSocket has exception `, error.stack || error);
|
||||
closeWebSocket(webSocket);
|
||||
}
|
||||
return;
|
||||
}
|
||||
globalThis.addEventListener('beforeunload', (e)=>{
|
||||
console.log('About to exit...');
|
||||
});
|
||||
globalThis.addEventListener('unload', (e)=>{
|
||||
console.log('Exiting');
|
||||
});
|
||||
serve(handler, {
|
||||
port: 8080,
|
||||
hostname: '0.0.0.0'
|
||||
});
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"importMap": "../../import_map.json"
|
||||
}
|
||||
539
apps/deno-vless/deno.lock
generated
@@ -1,539 +0,0 @@
|
||||
{
|
||||
"version": "2",
|
||||
"remote": {
|
||||
"https://deno.land/std@0.157.0/async/abortable.ts": "87aa7230be8360c24ad437212311c9e8d4328854baec27b4c7abb26e85515c06",
|
||||
"https://deno.land/std@0.157.0/async/deadline.ts": "48ac998d7564969f3e6ec6b6f9bf0217ebd00239b1b2292feba61272d5dd58d0",
|
||||
"https://deno.land/std@0.157.0/async/debounce.ts": "de5433bff08a2bb61416fc53b3bd2d5867090c8a815465e5b4a10a77495b1051",
|
||||
"https://deno.land/std@0.157.0/async/deferred.ts": "c01de44b9192359cebd3fe93273fcebf9e95110bf3360023917da9a2d1489fae",
|
||||
"https://deno.land/std@0.157.0/async/delay.ts": "0419dfc993752849692d1f9647edf13407c7facc3509b099381be99ffbc9d699",
|
||||
"https://deno.land/std@0.157.0/async/mod.ts": "dd0a8ed4f3984ffabe2fcca7c9f466b7932d57b1864ffee148a5d5388316db6b",
|
||||
"https://deno.land/std@0.157.0/async/mux_async_iterator.ts": "3447b28a2a582224a3d4d3596bccbba6e85040da3b97ed64012f7decce98d093",
|
||||
"https://deno.land/std@0.157.0/async/pool.ts": "ef9eb97b388543acbf0ac32647121e4dbe629236899586c4d4311a8770fbb239",
|
||||
"https://deno.land/std@0.157.0/async/tee.ts": "d27680d911816fcb3d231e16d690e7588079e66a9b2e5ce8cc354db94fdce95f",
|
||||
"https://deno.land/std@0.157.0/http/server.ts": "c1bce1cbf4060055f622d5c3f0e406fd553e5dca111ca836d28c6268f170ebeb",
|
||||
"https://deno.land/std@0.167.0/_util/asserts.ts": "d0844e9b62510f89ce1f9878b046f6a57bf88f208a10304aab50efcb48365272",
|
||||
"https://deno.land/std@0.167.0/_util/os.ts": "8a33345f74990e627b9dfe2de9b040004b08ea5146c7c9e8fe9a29070d193934",
|
||||
"https://deno.land/std@0.167.0/async/abortable.ts": "80b2ac399f142cc528f95a037a7d0e653296352d95c681e284533765961de409",
|
||||
"https://deno.land/std@0.167.0/async/deadline.ts": "2c2deb53c7c28ca1dda7a3ad81e70508b1ebc25db52559de6b8636c9278fd41f",
|
||||
"https://deno.land/std@0.167.0/async/debounce.ts": "60301ffb37e730cd2d6f9dadfd0ecb2a38857681bd7aaf6b0a106b06e5210a98",
|
||||
"https://deno.land/std@0.167.0/async/deferred.ts": "77d3f84255c3627f1cc88699d8472b664d7635990d5358c4351623e098e917d6",
|
||||
"https://deno.land/std@0.167.0/async/delay.ts": "5a9bfba8de38840308a7a33786a0155a7f6c1f7a859558ddcec5fe06e16daf57",
|
||||
"https://deno.land/std@0.167.0/async/mod.ts": "7809ad4bb223e40f5fdc043e5c7ca04e0e25eed35c32c3c32e28697c553fa6d9",
|
||||
"https://deno.land/std@0.167.0/async/mux_async_iterator.ts": "770a0ff26c59f8bbbda6b703a2235f04e379f73238e8d66a087edc68c2a2c35f",
|
||||
"https://deno.land/std@0.167.0/async/pool.ts": "6854d8cd675a74c73391c82005cbbe4cc58183bddcd1fbbd7c2bcda42b61cf69",
|
||||
"https://deno.land/std@0.167.0/async/retry.ts": "e8e5173623915bbc0ddc537698fa418cf875456c347eda1ed453528645b42e67",
|
||||
"https://deno.land/std@0.167.0/async/tee.ts": "3a47cc4e9a940904fd4341f0224907e199121c80b831faa5ec2b054c6d2eff5e",
|
||||
"https://deno.land/std@0.167.0/collections/_utils.ts": "fd759867be7a0047a1fa89ec89f7b58ebe3f2f7f089a8f4e416eb30c5d764868",
|
||||
"https://deno.land/std@0.167.0/collections/deep_merge.ts": "0303cca7697646c5464ecb3337d494602056babae4f09baf6619f1043ba7eb6d",
|
||||
"https://deno.land/std@0.167.0/crypto/_fnv/fnv32.ts": "aa9bddead8c6345087d3abd4ef35fb9655622afc333fc41fff382b36e64280b5",
|
||||
"https://deno.land/std@0.167.0/crypto/_fnv/fnv64.ts": "625d7e7505b6cb2e9801b5fd6ed0a89256bac12b2bbb3e4664b85a88b0ec5bef",
|
||||
"https://deno.land/std@0.167.0/crypto/_fnv/index.ts": "a8f6a361b4c6d54e5e89c16098f99b6962a1dd6ad1307dbc97fa1ecac5d7060a",
|
||||
"https://deno.land/std@0.167.0/crypto/_fnv/util.ts": "4848313bed7f00f55be3cb080aa0583fc007812ba965b03e4009665bde614ce3",
|
||||
"https://deno.land/std@0.167.0/crypto/_util.ts": "4a8cb74e7273d2400aa6da582ec58078cf8d54bc66530592048cbd7cc4152621",
|
||||
"https://deno.land/std@0.167.0/crypto/_wasm/lib/deno_std_wasm_crypto.generated.mjs": "71c1ac20f32fdbdc9b31a14917779c7fa392dbc8b050059cbb2c35b400b975b1",
|
||||
"https://deno.land/std@0.167.0/crypto/_wasm/mod.ts": "b49ec171049bbbaaed3c5a5a71dfcb3d09f880607c8d9c517638d0443bd0f874",
|
||||
"https://deno.land/std@0.167.0/crypto/keystack.ts": "ee8ee58ca876f619cef56f40127405f77f9738f50a459b6ba44234b3a2cb6cc8",
|
||||
"https://deno.land/std@0.167.0/crypto/mod.ts": "f953406904aa4257a6c76c40eb74b47d8dad83af8a77f33a4639cbac6d311baf",
|
||||
"https://deno.land/std@0.167.0/crypto/timing_safe_equal.ts": "3784958e40a5fe10429a68b75cc5f8d34356bf0bc2eb93c80c3033e2a6f17821",
|
||||
"https://deno.land/std@0.167.0/crypto/util.ts": "93fc9dbaa62421538ad60ee65337cbf1d8a0298fac3c4f70b37e5627e7e129eb",
|
||||
"https://deno.land/std@0.167.0/encoding/base64.ts": "8605e018e49211efc767686f6f687827d7f5fd5217163e981d8d693105640d7a",
|
||||
"https://deno.land/std@0.167.0/encoding/base64url.ts": "0283b12fcd306c11e3cf26fc022fecc800c6acc19704ea8bdb3908898fcd06d6",
|
||||
"https://deno.land/std@0.167.0/encoding/hex.ts": "b51e99b684486a3ad2406807a8be953f5ef8bac95af202774a759f9fcf0d87a6",
|
||||
"https://deno.land/std@0.167.0/flags/mod.ts": "4f50ec6383c02684db35de38b3ffb2cd5b9fcfcc0b1147055d1980c49e82521c",
|
||||
"https://deno.land/std@0.167.0/fmt/colors.ts": "03ad95e543d2808bc43c17a3dd29d25b43d0f16287fe562a0be89bf632454a12",
|
||||
"https://deno.land/std@0.167.0/http/file_server.ts": "369b5e4bb418e3ad6aae6d53102de292521604937acb3bfa27b90bbc59b50396",
|
||||
"https://deno.land/std@0.167.0/http/http_status.ts": "ed24048cc0d06066c944da59b0301da3ae2f990564bb4ad79bb52a09cf8e9b30",
|
||||
"https://deno.land/std@0.167.0/http/server.ts": "e99c1bee8a3f6571ee4cdeb2966efad465b8f6fe62bec1bdb59c1f007cc4d155",
|
||||
"https://deno.land/std@0.167.0/http/util.ts": "759a2b57b44b722d2033d0dfe077f7e9a257f431db6d0319b78dcfebed0adb1e",
|
||||
"https://deno.land/std@0.167.0/media_types/_util.ts": "ce9b4fc4ba1c447dafab619055e20fd88236ca6bdd7834a21f98bd193c3fbfa1",
|
||||
"https://deno.land/std@0.167.0/media_types/mod.ts": "8c0447e561dd74fb26c52ad0df92d9f2ab170329a11a3f78498e3ea94c0590fd",
|
||||
"https://deno.land/std@0.167.0/media_types/vendor/mime-db.v1.52.0.ts": "724cee25fa40f1a52d3937d6b4fbbfdd7791ff55e1b7ac08d9319d5632c7f5af",
|
||||
"https://deno.land/std@0.167.0/path/_constants.ts": "df1db3ffa6dd6d1252cc9617e5d72165cd2483df90e93833e13580687b6083c3",
|
||||
"https://deno.land/std@0.167.0/path/_interface.ts": "ee3b431a336b80cf445441109d089b70d87d5e248f4f90ff906820889ecf8d09",
|
||||
"https://deno.land/std@0.167.0/path/_util.ts": "d16be2a16e1204b65f9d0dfc54a9bc472cafe5f4a190b3c8471ec2016ccd1677",
|
||||
"https://deno.land/std@0.167.0/path/common.ts": "bee563630abd2d97f99d83c96c2fa0cca7cee103e8cb4e7699ec4d5db7bd2633",
|
||||
"https://deno.land/std@0.167.0/path/glob.ts": "81cc6c72be002cd546c7a22d1f263f82f63f37fe0035d9726aa96fc8f6e4afa1",
|
||||
"https://deno.land/std@0.167.0/path/mod.ts": "cf7cec7ac11b7048bb66af8ae03513e66595c279c65cfa12bfc07d9599608b78",
|
||||
"https://deno.land/std@0.167.0/path/posix.ts": "b859684bc4d80edfd4cad0a82371b50c716330bed51143d6dcdbe59e6278b30c",
|
||||
"https://deno.land/std@0.167.0/path/separator.ts": "fe1816cb765a8068afb3e8f13ad272351c85cbc739af56dacfc7d93d710fe0f9",
|
||||
"https://deno.land/std@0.167.0/path/win32.ts": "7cebd2bda6657371adc00061a1d23fdd87bcdf64b4843bb148b0b24c11b40f69",
|
||||
"https://deno.land/std@0.167.0/version.ts": "06714d4f648ff89b814ffe8ccd3a67f80517b078e0c9367496b8ef8b7d31fbfc",
|
||||
"https://deno.land/std@0.170.0/async/abortable.ts": "80b2ac399f142cc528f95a037a7d0e653296352d95c681e284533765961de409",
|
||||
"https://deno.land/std@0.170.0/async/deadline.ts": "2c2deb53c7c28ca1dda7a3ad81e70508b1ebc25db52559de6b8636c9278fd41f",
|
||||
"https://deno.land/std@0.170.0/async/debounce.ts": "60301ffb37e730cd2d6f9dadfd0ecb2a38857681bd7aaf6b0a106b06e5210a98",
|
||||
"https://deno.land/std@0.170.0/async/deferred.ts": "77d3f84255c3627f1cc88699d8472b664d7635990d5358c4351623e098e917d6",
|
||||
"https://deno.land/std@0.170.0/async/delay.ts": "5a9bfba8de38840308a7a33786a0155a7f6c1f7a859558ddcec5fe06e16daf57",
|
||||
"https://deno.land/std@0.170.0/async/mod.ts": "7809ad4bb223e40f5fdc043e5c7ca04e0e25eed35c32c3c32e28697c553fa6d9",
|
||||
"https://deno.land/std@0.170.0/async/mux_async_iterator.ts": "770a0ff26c59f8bbbda6b703a2235f04e379f73238e8d66a087edc68c2a2c35f",
|
||||
"https://deno.land/std@0.170.0/async/pool.ts": "6854d8cd675a74c73391c82005cbbe4cc58183bddcd1fbbd7c2bcda42b61cf69",
|
||||
"https://deno.land/std@0.170.0/async/retry.ts": "e8e5173623915bbc0ddc537698fa418cf875456c347eda1ed453528645b42e67",
|
||||
"https://deno.land/std@0.170.0/async/tee.ts": "3a47cc4e9a940904fd4341f0224907e199121c80b831faa5ec2b054c6d2eff5e",
|
||||
"https://deno.land/std@0.170.0/http/server.ts": "1b93c76cd415d7b6ad0ae36c17ccb9149b23f4dff018f7d5aa1ab5c36637eb45",
|
||||
"https://jspm.dev/lodash-es": "bd969abe143ae52e316a482de288c33f697a78f113ecddd0893d75a668ea7d62",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/00eee99c.js": "37070aa0478b631d73a493088920e39e809c4c8887c4a5ede242ad8cbfb95758",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/01736674.js": "2bedb78993d68efec3a9f12a882f71679a2a361b3d25d714e293f8b5b2de51bc",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/02d6c299.js": "6fe98cef98517a9381fa22636fd0557a8ee146d224e5821ebdbe0740ae475983",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/05d03ed7.js": "3f8b9275e36ce11dc34d8a355fea3a204ce200fdea42c1644c9566bfd531f542",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/0b311353.js": "416555d524b35bd3bcddcad23cb4f9400b18df197da272a0e34349b49c2da289",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/0b5bcb97.js": "f85857f8c923cd0dc96b8e077c724238b19d976c622675f693037c2fddda8c8b",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/0bb20403.js": "13d1eec9a9ae4403fcfe97aa85d11f581a43b05a5f43a436b43f010b24a93522",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/0c0b1c46.js": "e06d62e267fd70698fc849dbee243bce22a4c67b27a95e229a709ae7927e9b4b",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/10c2be66.js": "fef2a0411495287081dcdb487f8a19056d163988822f175a532303e45e26bdc4",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/130bf524.js": "1a3941e656304ee9247bfc10de18e8f15c530ebc326624a68b65ec596144c0a8",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/1383de04.js": "f11f6cf2b27b5ec70710e992415193550776673e2c2df05e2ee81a580239c9f5",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/1386403c.js": "2832b0a6d4a1a7d4050ed24a3576451a7fc9b923aad3cfa18aa78cbd8007a91b",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/1545748e.js": "3770903adc448f2d3d6e6e03c9c34d33c913e224b87646082be11f11fc88d562",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/16393db3.js": "a5095c7aa6f2d717a5ecf4845e3ea9f30c093f5211cdd6928275b1983dbc5084",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/17fb905d.js": "00f0bc1a6cd1564dc7812bba6b82e432eafe079762b9a90c83f56d8cc32a8563",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/19315954.js": "0be2bac09cd0fd8df4fd7805b4674f9ffa534ba3a5ea98fddde2faefd436dcfc",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/1d34989e.js": "64cbd52b2880f70c665a9b41d74f72307d326fd90c34e429300c7221453f6436",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/1dfe23ae.js": "813088b806241074f3f000e435ff0e21864eb6df27127a32eedcbb868f4c788a",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/1e0e86cd.js": "980593e57c9215cfb61e6c34bbedbbe42c1507d175b2cd603ffc91aad2ad647c",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/203a09f2.js": "62eb56ac3aceb71788219ff1b2f56f3be858ab53f059b69585938b1691cde0bd",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/24eddd3d.js": "2dc23d60b9e3977a0db4aed01d2e584aa87d94a58750559db88e5ca4ad9d71a6",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/27733a90.js": "2d8afdb8dc0bdb492f088915bad9e87da92f7c962cca96df370d8c3f8767ca17",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/28e2aab9.js": "539cef76090d73da43e2506c72e6cc9d2c3644c85557d11698d6d6f0ad796832",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/2a83f3a2.js": "d82cba4f089f95e365b979287c7781a7791add7e1f3f5fff83a3c1658035c284",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/2b1d23fe.js": "8afce7d40a560985789df5242f1391d581e1168d943b2fde77c6bac7d6e8ce35",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/2d655bf5.js": "51782fa05b78d8df3b0eab334b9319a1d6d2c76c9f680522c3151ef8d8750db3",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/30141f0f.js": "b39b533cb1df9d177e94f19c599052646a3e6761a080ac3488bdbcd84ae9a163",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/3151fc5f.js": "dbf0065b61f72e0e9d73aa8df49cdf0004271e364dfbfe175c499b98b49a7bee",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/31bf9ac3.js": "7dbe1e52f19dc675be8c3addd35ea7a9c6b70c93c4d5821a310c0a629516c6e9",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/36c815fc.js": "80f3fd5c8e1c75d840d0b01dd6bc1125926ec1f61bd39d504a578464602a50e0",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/38394896.js": "c6ef95c557f1eba137d41a232ead46d7775d91d93f1640cbe9b072298baa3707",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/399d274a.js": "ca843f79d6c6f71e3b89d02e850417884f1296ad6300baee52804326a354920a",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/3a395ce1.js": "d658b0c52d7aad0e1e76920320a74fc36488f8fd8023208a69bf7fcb1327cd7b",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/3cfb9cd3.js": "c8d0c25ca446ced635aa39de4b741031f3b0ef778669d69fe05c20dc49428188",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/3d95c57d.js": "bb9274bf53afea744b1138dddbb8e5ef8866229f661b4cba131d6158ad90cca4",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/402c5d7a.js": "8bf062d4423f6f6a7f9c50bd5e929f91f8df740591a5f254630ff559179c983f",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/407ebd0d.js": "a558f31bd1e749e84084f90a19a19df72b80e089ee16e69dd022ba34d8b553c8",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/43b5d56d.js": "af04041dd2dc11d0ee0967c002d12dfb09f16745e5575849a16d343c92c4c071",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/463e7889.js": "ac52074f7a4e4c47c3339e813bb2623f6c486b68f0f58cc9023b6fff0fa581a5",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/48027737.js": "5048145a8eec822e1c810854d50b5200eb9db397017b17ff6d9f00f69fa31672",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/484e8999.js": "58b03040e5caa0c0e2109c3846cc6bab5df92c4d27ec4224159ecce9406e2903",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/4d837337.js": "854450a64703426033bf70c2c8a6dca8fc88c6cef2e569f6ed38cd535874e84d",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/502197cf.js": "6fea2a2ca31fbc71a3727bde69ec982fb0e20eb0b75ca703960fd57b428f464f",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/51a9bdd4.js": "4de759414b19f610be5f380bf07ac2ae8da66b59249c9ea74a0061717ec281c4",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/53bd6314.js": "023303433119467c1a845e3594c9b21c2ef6b238b76edc196759fd31f6146da4",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/56765766.js": "ec493b01df613f602d488b2bb3caa13bdc3c522a86eaeec3dadb5de33b1890d6",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/5839515d.js": "ee0762bcb9a20e698eea69f971b9b91d172ec39f5a513a1cd36b8e0daeb81220",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/585c9edc.js": "c89d4b434be7deb2c1a7e1de856fbe69aa37125411c8fd6b6b05241b90883ff5",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/592507a7.js": "76b75d86efd915c46d53c07aa8d1f2c0083c043747afde898a96a9023f862b68",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/5c0e4804.js": "10bf72afaee300056346251d07c085f731b67f6725e0abf6f471c8c765ac719b",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/5f448d66.js": "57f7ca9d4574963a160b9cc9e21a31b5e274b03f1f3d390a327ae05e6da3e313",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/5feb7f4d.js": "77a9344c0752364af435ed34ecfebc2eeedf1b8d5fff00a54d7eb29f33b48121",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/60f3bb4b.js": "d6e6f5a638db2cd61d9edc4eea06557158bfe4c36432f3f91b6f0613325fbb7d",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/635961f9.js": "71317f9cf5723be1bd660582dc67d14f3da9acd2b69a3c28b177a55ecd302215",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/65103b5d.js": "ee5510d5ebf566c883df89bd7942c579a3d8fb9dd279ad53bb71b48df22e1ea2",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/66f45db3.js": "b0e86aa06314c4129c6526a11fc088879750c2799938f5e5a13595a164a90f6a",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/6703045c.js": "6198501112257dd9e6ecb9b5c57a594cdaf37af777fce5ff83684b19e47f974c",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/67807643.js": "dfd3e7795b80ce39d52263067985032c4751eede9c6eeff503cf59995a6ab272",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/6fb96f49.js": "d933516b8a1a67bd0ff40fe3fd5ee3789d814125b4d787abe81a60eddd1271eb",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/703e5e28.js": "4dc6c69c7955c9260a874b1a06979c6f4923fae4197c86277f3453e8bd4d16cd",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/7100b469.js": "4e2b3570f10e1bf90b687dd342b935b60ee6a180bbf3f377b4bfb41ac21b6d0f",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/73372287.js": "fb96dce6428c3fb5fec2317a08f86850f31367af5a18d73753ca40e140a7a5d2",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/75cff482.js": "182b02e552b20319f058a9f4c0c180718bb1bfaaf74aed67d5e6972a231dde8e",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/76ea3370.js": "8d1f899618e63ba94489bddd8d80a2c62dc07b3f69cacf48e9dc7ed16fe586e0",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/7801f571.js": "a20305d64ee42a5bb7938e62dae0c806af207dd32125bf2e2c0d5021fe944523",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/7953e050.js": "3db506ed2c3c531038244dce34cd5dbfdf83e3bb2bec81326b667c25fd00c4ce",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/796fa7c7.js": "13a4ae014d4e80db42128df3439935f47e9c80520998bc8b3179490631ebe776",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/79a1b287.js": "838dc4f43daf1247a7afdf17094936c5a75ae805404c6ea8e338c891d8c9a6ac",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/7a7ec766.js": "dee0686a9fbde7f463698fe010d61287cb3afbbb65d746c44cbba7bda82c46b9",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/7a86998d.js": "580be03b87915a1a7c58161bcc8ecf8622e4b667fa9d7f73eff04247638215b8",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/7bbc195f.js": "4324b885bb1c31e1d839f9322e06643fbcbdc92c5fa67ff7a4e80ae5b94d4fdb",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/7e70392a.js": "72a4cd7ee7882df13ccb8d9271171ea0117f1c3b16a9d60c1edd27b80153d63f",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/7fcaefab.js": "7022d8cffed88a437cac03dc06cb5dc4705d69b2ec97f46bed07c881a108f252",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/822773d9.js": "87f8b42251a27a2fe97e56dde36926308b3a594949af1b196decb881f0aae145",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/841bb6c0.js": "a18a19d08c179a17fc105d40e2627fc35244555c22aac2b3cb88d78a112cc63f",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/874eb754.js": "4a68b137ae16b855946f71115bc42122415aee29d3081e6663b12b57115c1c15",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/87e6bc8a.js": "62b7398cc1ff6a6dfe705c11fe4f8637d3d3b89d6d59fdd57b399dd2aa39e021",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/88d7c693.js": "eb6b1a07b8341a677684f2420019c6d1f0e7cf59389cc19570c1ac2599262aae",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/894288ab.js": "90ee762097c230c8d807d8e4f7d58be7efaa1c0d6fed92f011ba82770082bf4c",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/8babf61e.js": "7d3735645ad3d5f40d3ffe0e20ef5e4ec03d4873f02a211b300f79f16240c4fb",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/8bc5f7f3.js": "ac061a69c7cc70d4d8072ba9a10605188946dfc6662735232db513b3b9839b4e",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/8d4d122f.js": "ba1e9835b009e90fd3dd5cab7053c2ca7fe4aeb319812ec422692cb95582a83a",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/8d8705aa.js": "23b2c68207f3e3dd8b449b9d4f190e4620ac22d5d7a12ad69859cb0b9a51980c",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/8fb9d566.js": "68eefe77564498475dabafa07be0076eba21cd941966e33822915e2da5b35c37",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/9056e65a.js": "e00f21dc84616751a13b6590a81c1c52b3a70ec32c5223a0ee64e970d6326fda",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/98062778.js": "43e805ed06acc9d93aa6e7f7e9e3571c941a18d3bf4e12c6a3d36802d2eee6c3",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/986b7729.js": "921aaaa196ad899f72d955b0a84689f874826562132ec43797c7df1c8e2f8edc",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/98df1741.js": "ce999fd4ce4e2637497fb9a2b158b5286a6be9a397947201bc7da0dabf932456",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/9950791a.js": "fca503f242e2c1d2570db9cad24f0217724e8dad2e74fb96bde27da8fbbc5e10",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/9bf895a3.js": "8028ad9529cfcb56f5c0f23c89e1523680ad3caa6564660483863d2319c164ea",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/9c462ada.js": "9c097bedd311655ed640d3c6cf7c50bf17dccd0f2973176309e654ae8ed3b6db",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/9db0989d.js": "f79eb7b4fb71aec9f77ddd22be0fecf8058eac98dff324f68a6a1735c6f99df2",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/9f137e5b.js": "30996c0bf954eaef8e195011b13250947b2ece8cdb9f3a8416474b302e7a64c6",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/a4e96b24.js": "c8c8498aab385ea8c73c12c884e1ad6279c2adc116093a6cafa5795705620f6d",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/a8ebb5d4.js": "15282b92bbddc4040df4745a1045d28449e4919d3909b9b2f706b4a5f3683975",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/ad435a40.js": "01f97d1f669b867f15c228b7e53e66dd81ba7799202546ecc17d3c7245e64471",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/b0d71dac.js": "07a29f1ff46e4411f9b63f5082f63dbe45ce88c67688159c32088a95b8beaa75",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/b17df163.js": "219baa925ae221c086fc7bf7487091c02713ab541475818de7c7bb381fa6b1d0",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/b1d05723.js": "d4f60198c50c33679afd356b5391030982d11f187b39fac285ad4c9fa4d4f272",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/b225817a.js": "750214238a44dbb94665795080ccde95c44d52547e3dad248d50354c1a411b83",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/b731ddec.js": "392c581875c331eede5d0376fe9bb31977d3efc7de72217059ed81139478b08d",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/bda11cda.js": "c98c5df65d3d4662863207e02cec664de57f463b3c7c79383e8d015abf4e4f3e",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/be1f91e4.js": "3896ea6a62b3d3631a0a3141bbc5c60e91ebb1ce3da583124adf673dcc670182",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/c0862ccb.js": "2ce24f0af749237355cd91eaf5a4223e08d0e33391a625006cc82281fa0c706c",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/c5f390e5.js": "965a712b7146026be20665c514c00ec77c73ebab9302f06a278806f656e24d11",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/c7012d8a.js": "99719f1416495375967029974daa1944750a2046a65a3b48dbd1d36ff79c3f59",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/c952862c.js": "0226be118dc33fb52ced27a9639c18fa0347695dbdb6a1abc33eb34b5d4f4458",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/c96a0489.js": "d5d59f61eed1703618cc70376a473ec97c98e26c585d4000bf41a678c0dde1df",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/cc60ce64.js": "e7a59d1cc18e203fe15d32dce0ae80d5dc9c9173a68f3cc8536f906631c08b21",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/cf0de6d8.js": "7853c9c380abecaba7128bcd4c221c90486d2361c06dde43f5a695306abbce5d",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/d14d4efa.js": "ab48edb7a88caeffda97f9b0d4c581ebe220dce27b718f997977de88bbc512e7",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/d32deed4.js": "e7e959a4d28ba39cdb59ce7f002ead6adc7d7e62ab1496c4dc460452d6452b2e",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/d4a1ebe8.js": "1eaa0d642534855d16c1f13fa2a82051dd33bfe6608dfcd28aff94ed9c0bc2e9",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/d9fd2a7c.js": "6f2dfdcaf1678853ffa4b36faa392b2df50903c40522b85ad6e3135e5464f98b",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/da987058.js": "a43aa826c50185b6cdf59831750b5deae4510d36a34dcbffaae842845740b13a",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/db85cb17.js": "be21f10d6372c7af85a7a4124768860c37c7a3e58b19a2d728cfdf7216218e55",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/dcfc3998.js": "663caa0605460b5ba360e84d3d435ea4ef4ec2573f9346fc36ca9f0d3f731566",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/def5a505.js": "f3224b338bad3da8fedeb47bfb4023888baf8d5387745911ee4dcb04f225d366",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/df9293ee.js": "73776a64dc12f1413646bfd2d250ad854c64b9ef172fd4c6d77b93fa332f91e2",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/e10cd6f2.js": "c54b7034d8a82a2d63ca542eba8f17296c4a05beec312735a44dc17a2770a950",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/e1d4e071.js": "8feb9df6185324d58ca1167d9c14873c53e7e7ed396238756da6c451189677e8",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/e524acca.js": "f1bd4a54716f512f4a3249e37f6dcc3281d09ae0053f76758bcb27579dd6d6d7",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/e52eecc0.js": "92531672d0331c7101f0dba92dcab787f5a55472cf965e9a94c7d0a4dfe2c600",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/e6902cb9.js": "e075f9be90c0d1c57148a546b9d3e5e68c6537421163478168f07dced72d5aa6",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/e6cabbd0.js": "2549cbe0827d2754abb5b45f64b7e96ae24fecfbb802859ecf8b0d5ad58d6898",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/e8626fab.js": "a0eb1aac0507355c359588ca71ec7d91d5c269542ce0a29242fe005b49378a3b",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/ebbec2c8.js": "2e4d7652a563e35d3213c54e00bdd8d2b6c8bd87f1734c3c38ddd27a9d062e01",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/f01ae9b5.js": "295cdcaa1029b51ee863fc0cf9e819bfeae55ee2a7df367483e63712e3cebfb8",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/f08a6ffe.js": "9109344bf0776b2c30de2dcc4b8d5f58dc32aee48e649f11811f9ec1177db9e1",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/f945550f.js": "cf04071a967ad944ea086be9822f09a9e52ca4d17c9c9db8cd65eb1f80ab53b1",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/fc09277a.js": "2706d821dd6e7f5ef880f6b9e631efd44949a0e081a723063d2fda09929fcdc0",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/fccdb4f4.js": "767bd249ef3089cb7da63149080211025236694919cc4b1007f1c7e4b9d3fffd",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/ff41ecfb.js": "7d63ff01dce794a12ac4415ef94d9d5f2bb476cb7adc97aabfc7b586bd1aa488",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_/ffc0ea6b.js": "9c3f20833420019e26371ee0c3e90e3a2704e391d685d3297a78322eef4d62db",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_arrayEach": "afcc5a28962d983cda016f265ff9918341e9b2218448c0935a71c6818ac489cd",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_arrayEvery": "960bbd642b7fe2cce6d936f8ea714d9e31ada5673a18b5efb8c417b6c0a7ce52",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_arrayFilter": "292cefd33bbd5b86d31bb10ef62bda753dddd0c6b03b47af2d80eaab214f1153",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_arrayMap": "a832d5f9c633a539c3bd1ead4eab96c2e55a413f8df07946528c17c574107670",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_baseClone": "1500b9c33c0c4cf22be69a7e694a55af966c7c37817ce096a578884dec9a2845",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_baseEvery": "fb8712e564aa688d42f7bd8aac174bb8b7855b76ede1ec2242308ba739feb1da",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_baseForOwn": "6e44508de841e82bd162235708e69be04daafa4f41a28a87515cd4921502147a",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_baseHas": "62e58f125804f1a6ccb5a96d0966e921a20f7bb5a9cf0b5cb8ce5a76011ef710",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_baseIndexOf": "7f855822ccb438335ba078cc705d70d57412d577ce7a65848dbf991b7c4c8d5b",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_baseProperty": "0e64ba27c7c45d03954da0450457df1374cf082d555659d5e30ee9d2c287d668",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_baseRange": "8d369cafe5fff2c94b91cc6684d03c6b3f992fb56c65ca145469772a43665d80",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_baseRest": "5ad9ff40a2ea3777c4efec69b7a354173e785e916dce915ac24457d436d830d0",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_copyArray": "c1a8db9f2e96de5402b0c18c51d92e9a60eda26dca5875e1a351d4be40a3fe9f",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/_overRest": "3083837bb6e6c425dcf3907733bddcc1c00f3c5f0234e10754f09d1f95d66d9e",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/add.js": "1a244d164fa836db91e98f827fdcd2e405948841331a67963d2d104a4deee4fe",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/after.js": "40a42ac08f1de8fcc368309830f10ad950d35e4e1fb0ca9cd0d66565c8af956d",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/ary.js": "371e34ee852967a293b25cb8c13ab1ccfa8a3a69bca5f8ef6670144fcac70f12",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/assign": "d1128ddeb291b2a6ec867f55a75d57bba040c06592579d464339a87c459eb17a",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/assignIn.js": "2ef29b5c3d6e2e4c0e7688dc6150f721b53fe29f120b273b1ebfd17e5fe97f14",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/assignInWith.js": "28d2a5b338cc1d0ed4150e5b0fe08f36419a31e23e43d82e3ff99f93b0e5c87a",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/assignWith": "5b69a43ca901c554205b5ef18d5119180233028b46e38b256ec83e14802784e9",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/at": "b8a37cdca937bcc5382ecfc758085439e525bcd1e795e1f87dc347cf4e7224b7",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/attempt": "c605ec552de80c9acba609995def59deabf3414b5d09c2c47f43a29107928235",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/before.js": "ad21da9318faefd0c3f9323dd431040b6f1448fc7acfaf856ecc330547150eb0",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/bind": "2e807e953ab13235680bd15f5158f8b81fc0da43f9872b9c95a0deb7ea9aab62",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/bindAll.js": "d5bc48a0ffd79efcc6d1ff4db6c22d1d397184aacdc3e97adbfb0edc4e7bd562",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/bindKey.js": "a406389507d54551f85d9531e78bf2ebf681927fe229af1a3c1c6dbd7e589122",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/camelCase": "75fbbf93244ba1e76d3ac335b37761671e520b411bdff6a9a93bbddd1d289eba",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/capitalize": "9c63b6eb33e6f848089c593811afa762bcb85ce2a8290b1c5a22a3855f1a04b9",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/castArray": "4145d6e0746e5970e2aa800ef47cf26fb41983ab968778fba9b515c10b37b4c8",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/ceil.js": "18db70461ddfa7a437e9a1b7078dc659a082777927b10bed631994103b90e28e",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/chain.js": "fc72a2ec68d56e665aa085d6f3af561c021404010acbcb1217f32b3a840f1186",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/chunk": "bf4ff5d53fd0dfdc47dd37172a4b5598f4a4000dab75dbf3e79a80064d8886a9",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/clamp": "d904ae5dbd1fcec01e8ff50fd1e533340a8d5b5a5fb2eff36faba20ab53e5bc6",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/clone": "8d1337bebebbfd685d037215948bc50c3160aace2e85e40a221312aee40cb313",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/cloneDeep": "83b61c7188bd74358ed47ede85d25d7847751e7a1505ce6f5d9d6bfff6132b37",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/cloneDeepWith": "9e59fcbfdd4687cf4ffcfec3298d2ac3a379b41fb1c6e080f602de30604f3c34",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/cloneWith.js": "64b47470fb9a091513252ea58950b11e9d4ae10b57b7dc7d326c0cdba704f273",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/commit.js": "54daa6b6a9e0650fecfc1b7016950263ffd524060c17aab04bb862175a53a486",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/compact": "c0d33d79bab072010c1ef687413c958601a7b14286ad3199e40323a828c7c9e4",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/concat": "96194b27cb82c06eff603231f0ec32d4401e3515951f7c79b372ea8fac5bbd78",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/cond.js": "7485ae05c55c659c2e5bcd9d8e0f06fb07865a242ab908ef4f46fcb56ce7042b",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/conforms.js": "c1e704643485430be899f873cd3acaeba3d7bad5f969589f08e2ea96a067ff5d",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/conformsTo.js": "cc738abf20f685269ed3c8cb2fe206cd9932ee284d31ec367c445f919b1ee5ea",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/constant": "58b50a427440a5ff93ad7e5378bbb943e2f043123f5a7e4382c79a78e2a725b2",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/countBy": "7a52f9d1f3d0ded660e1c7f1b3fb59b41de7ab6203e78a4f839da02e2617c4d1",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/create.js": "3371e9ffc9f2fc42873cbde9c4892888cef37252649cccb7f2d287cbaffce7c6",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/curry": "28f16d7394b2446d77cda07f4813d7ffd5a1c28454da36d66f33be08e44bbb67",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/curryRight.js": "22697996cfbbbee79f9292cdfe78824bab07697aacd32c776f41c6443f1cd686",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/debounce": "7348f465b2f73be2cf57114a82526aded112e3037d3d942e8f42a89787dd9ebe",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/deburr": "c381eed450b9ea635b0eeaa97289b6dba6eb8a19fea9395bdafdb291348f685f",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/defaultTo": "deedf26555de4f37837e7ea161d032dc0ebd3899d5eb62972b7ba374a3b3dfc2",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/defaults": "8dd3734fdb1c307b1f5c1a2c99f471039d5b2ced0a0b689a192645c7e740eb9f",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/defaultsDeep": "9f2ad67e4cde41d286946a37a0161d5b6149ddfe62ae231cb8df495318c60c5d",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/defer": "734716e2d145426d806717880e5e660c46296e051a4aff1f206871b5e656bed9",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/delay": "472e971debb0bd7736679d4a6b765a9d6253aac451aa1e9bded6d899e31bf977",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/difference": "0b5b72bde60b37a1a172c495c78ac8d373e73ffc66de1da6177e75b4175c465e",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/differenceBy": "2df180c384f719e55bf9f94c1ddee7b14daa01f54c1df69cc823e94ae921a50d",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/differenceWith": "eb1b0c612465eaa5ae14ac36145d592d348dadcfd90d2fee4589597d04ca34fc",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/divide.js": "4ab52e3c1504e6641a7f5bbc7cdf88c610e99600eff75e4917d46c78581cd845",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/drop": "6c732193e5e681dff00f6dd135a36435c0b70ec6790208b782533d5cf5ddd79d",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/dropRight": "cd400b7bce9b92d244929e37d8dec3a284c230916b4fed3388b311c489a79593",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/dropRightWhile.js": "6ff589a0ba2795dc56aaafac35f0fb5607d8a5a125d4e7ea2bc39696acdc33f8",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/dropWhile.js": "8a46e9b4026f5e48cfd28f365778974e103fa0248dc4de1af69dccb12053aa55",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/each": "2615ee61c1b07fba411a4df3d95657fbe9857c1cb5f16674b95d7bd98ecffdf4",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/eachRight": "7ec260f20b32cdc9e1cb0a877e63649da245bfb811f64a0f9228a8413b7c5ca4",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/endsWith": "7c103441d2f28bcae9ec2c11673ae913702564bd2d49c65aa41e1e49108df2f5",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/entries": "b997a412de36d37dc5cd10b5818a993d3ad8aafc07f1042f94cec32989e87bc0",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/entriesIn.js": "bdb3972ed805d0a971f25cecf92d8425ae15f1de276ea3aaf8182d2829170e08",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/eq": "a6960b851bb2f92f51bcc8a398387da815f717f9cc083cc3ed594e9d82fe667e",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/escape.js": "d9ef15d72b3e9a7bb275a05d0278da592b7144684030b6c9bab153e54130c2b6",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/escapeRegExp": "d2db3897830c406f16baca56bddfb5c53a583ae4c9233c46d689a71f7c25796a",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/every": "d8cb1c33006a6f937682744bcd03306d32dfb93083f91724d46152bdcd516562",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/extend": "518814c7eeb2ff5b7aff8a4bfa29d35fb83be827bb41001d2f44500c01108565",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/extendWith": "cffcfaca39feaa7de87db7318fd07df5995a94f82692cf166b650083b6d3f505",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/fill": "0cb81c66f155aa979a3d42ddcccaef9ced584f3442f5095d0ddd69c9eddad25d",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/filter": "612c5fb488424976bb20e4e5e24d8e1f90c4744a16760417162fbfa81a57a399",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/find": "128407773c64cddd3d9fcd00130c4de0a3f8f21c2457e2214aaf4ff6cca07e0b",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/findIndex": "eb33f75a9824515c81a52d58a06722757ffec6892af160770dd6c8e22d030e1b",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/findKey": "93362f5a57b4997c7528266f755492ff5d9aa1a53df1fad1950d471f13bc06ca",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/findLast": "abf7a400942675894b0d327d711d11344500b9b83630c68bbc9bb75f15987a47",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/findLastIndex.js": "6ffea5aa4e47ccff4a95f6561f8d48e72fb13191e24cb2a4822fd390ded7b4e3",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/findLastKey.js": "72ece71fb81825378f0becf8dc799c25a913ee5c3b39dac6f38c44b501a2f5c4",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/first": "5ce0037fff3a845be31070f201058dbe4e0b19f321bc5ca1407f4cf7df68e55f",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/flatMap": "8c4202b819100033d25cc1a51206554c9fcc7c9d6e4dce309980fa20ce3606cb",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/flatMapDeep.js": "2c5923630b12d2b19481da1937de086ba534d460fba6e4a017f13c6c48595618",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/flatMapDepth.js": "bede4fa48f887d7cedcdaeee913a51bda3ac6f8067b2d2a5bd89f6ffb514f9be",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/flatten": "ea5f55d735fc9fdc36db6fdc89f1f9cf6ebc31472752b25f00e6a3509833367b",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/flattenDeep": "c2dbe1185458cd6d1c0679e37a668201a38b5c99d20ad250e942c53ab93696b0",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/flattenDepth": "2499e2145ac7c61e68a4d88fe0781490d7fe0a30d6e086f560e2e320f8022b13",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/flip.js": "caf7d0d68817076639431907db72dfa29ca5b760cb84ba563817e7d5ac0d98af",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/floor": "1d94073557253c18de194d2ee32d907f2382541cebe68c882327b4f836f2f254",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/flow": "a05f960aa3a48951ad7bc2c75239020de228dd6f2e23237e57bb4178b45a36b0",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/flowRight": "e852d72ea3f3924648f48c098cf54b9e193eae083d47f2cc891e36fba68df0cd",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/forEach": "a78a02c29af4b506af29257629f2a5ad9bdb9de4a4fa8f08ec0a30935967db9f",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/forEachRight": "95d4a09173d6f119802072f008d671a38d1e50aff8e611224170cdefd2414973",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/forIn": "ff17b7bec3acd8c8662d8d1a72b20c95a23ba42de552fabd47f86109493117a5",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/forInRight.js": "6f6bddfc0a36cec0c793e98955774a29bd9964ea655a71f6b58c25258b352f33",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/forOwn": "ab979e1b9241805349a917a2066273c93a6faca000f19074343b95c1a3ed4908",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/forOwnRight.js": "cba1a5b206c50d77e01027dab005492f1aa5300dc487b7959063835b2ce1025a",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/fromPairs": "a79d6b6b658743af350a25c2449b7c465e282954ea233570461b6a709438c562",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/functions.js": "5c9fd4f6ddaab88f063054741c451447423019243dfabd15b53ab01d83fbeae7",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/functionsIn.js": "26b2b543db13874ec5116644459db164b40157bb08d7548c8e5cf609663de1aa",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/get": "71d9f03aefdd53fc5963bb23125c3bd55610721af3020df59bbf830fbcf136f1",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/groupBy": "a7b7b4e37bc610b6bbf19b32de0bcaab289fafd3177abde3167ec152cc9024a4",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/gt": "3f941d219c74be4354e964b20e0d957395cf7632743d05221d109a91c9b22ac4",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/gte": "a39b98c684d433bcdaecef7418f7af624b385ff6493326e5cab019d070ecdf4c",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/has": "ba047d514ef7a6b5821f3562f793d9f69901f18b1b5e8c8d98376240ea0e3948",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/hasIn": "b4eae03f1a62d4117c8c8ce5c896825aec69d858dcf15841ad0ceee2d04eb102",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/head": "89f6db54146d6638267b3c8d14f955cd751427bc823db5f676e48d8091c8d416",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/identity": "513134ab65e6acdebddc3d90ab397a247fbb5a89453a757e8de1094a96294098",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/inRange": "2ffd2677970316749fe00407ad45063e7bb6783074c6a639758387117c6130bf",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/includes": "c9bb08835b433ae16727e434d39a39d68ac6483be4a693121181b97052442bbb",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/indexOf": "b606ffbfdd3f49f7678e83bfb91f6ec89b6abe635c5ff7dc33bf9d61a867afa3",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/initial.js": "b14b4098985db54029230a24e7e7597585592bc8441c9e55a38c57c9fd062ddd",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/intersection": "2afa7c154e61dd9e86f6069b9fa5aab698b2ed59fce3eba2546441003c02bed7",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/intersectionBy": "2aa99198bbe89f92192dfce837c33bca3e30de2229d4b2df6a70da2467e1a0f6",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/intersectionWith.js": "419bcc0777f530488a71c910b504af7a27c59e7b2479aabe010f4b861eff2edc",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/invert": "1e8d757667c1712225cc0b97b39ff27bac78ec790326d20338b92f32257c23fb",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/invertBy": "0d3de74f4f04e4afbccd45926f2cb9b418a1586fc167af69d81c52844163f346",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/invoke.js": "4ec87d0d09c4b4552baa4b50cca8735dafb64ebe8a82b937a2946884991d2459",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/invokeMap.js": "12a73e1c3161e0d69c3645c2e0595448098f24a7d8cda46aef2b5d2a37cf1bd6",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/isArguments.js": "dbfc6cbf445ae1dd34ffce399ce5142cf7bc012814efeafa63cfc3ef659f2816",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/isArray": "1c0ce93062b0066c590f56f71c76958365e09bb3dc7cbd9852c3e7555f2ac74e",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/isArrayBuffer.js": "b443ce56931c1e0742303fbafdc830bc97e86117b62d68c57d935d62dc8240ba",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/isArrayLike": "aa2cbfaebfb3335a1afdeed7a519123c5022cf903b9eae1a7d93ecdb14ead41d",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/isArrayLikeObject.js": "f8d0de0abb3ad4261e3fa40b3cc42ea710121db812bf99bd444976489025a93e",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/isBoolean": "bfea211893e2a1d340246b9c399b0957868962be3b941e8ae090ab999d414856",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/isBuffer.js": "47c2417a8b0476869583288bd95fdb85ff13fa93ca95f0fd607f012f5c6ce980",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/isDate": "beb9481a329f99ef966f1fbef82ba6d31a9bbbcfed587c3545172bd702535337",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/isElement": "0c32c3fc4c70a0e4467eddc9e2f0047602cb4b7abd3301ab24e64c96ccd0ec38",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/isEmpty": "5d078d9a0809d6cc0b6320eb6dbb67aef8b9fc1793fd58d134a77272bfb48150",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/isEqual": "25683bf56f1b4c10bd041fb6e677efa81411060ffdb24cbe0bd275f3cadd543d",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/isEqualWith": "b6d0e23770c0193e2c0e0a980ab71661db53ff3e8a665d12a2bb27c125d9f578",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/isError.js": "53e5e06022cfdbc256c2fdf4dec387198b745a86db3f7004020596ca9c2c2299",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/isFinite": "64c18834587722785105bffd28a996bef68603ffa04714449ef0755bda52aa54",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/isFunction": "f8ebf17d0b6cba27259841a7415439d3c7f52517d1a5ca47e637a21a746edc9c",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/isInteger": "8c5ce4e891ad1bdfd0ac9e9f233367bec3f885b06ff40fa2d92c6718086ee5bb",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/isLength.js": "6d4ccbfc19fe11a68d0a41415fa916ec571d5a119e16d7db5fb46097d83d3865",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/isMap": "a848128c7ef8664c82bd80b52e72345a3f45a01d3db67d2d19ea1bb8c525ab3b",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/isMatch": "4ac71ae1d0cd9c9e5affbefb0d734de2d862e5211092f1b05145e3044038f0d4",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/isMatchWith.js": "8a0c7b3fd6cdff3687926303d30f442f79485fcfe6ff010cb1ccfcf6c4a562bc",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/isNaN": "ced5350082e2342e9802c5a32ae6091a452484a58a6bd9b5ac0a0db6e793130a",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/isNative.js": "d98dbdf71d79fb8432b7971d2b486504a957da8da2b4d92f3694d6b2c2bde70b",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/isNil": "5abfd43ebfdf86b2df57a62ef5eca7b7795859572ba83fcccb7d329235aba38a",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/isNull": "040436160bb4bb2034ebc40faf725637c31b22dce2e363184c6c93d733c67b84",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/isNumber": "9547dd2679b1276f0ad449715dd8c83334cb114fde995dd1ff6339db4a0e5787",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/isObject": "978d0ce182b02604111d6ae8d210616897218f1336404f6eab6b422d10f7e84f",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/isObjectLike": "89210bfce73a34cfa1180fb69b93812775e50057e78b3a583ebcacc8c3f86af7",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/isPlainObject": "8e8d9108e08a7c6ac63d30657c596161eeedc41319c9ba8fc8ed8aeac1fc7e62",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/isRegExp": "b34515b0ebac383c406cae514ce09a7e3489729fadb30985b5a968c461a970ea",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/isSafeInteger.js": "03b436d1f515996fef9b4e03659978f46488a4b8af7c75184d17aa44687c7c82",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/isSet.js": "93f1595e1b7dcb80a1ec0cac14b912dc17c0a7bfec4aa45f474ce0818a357d38",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/isString": "d61cf99d7df5f3d34c721cce203864c895c42f8952bad13076b288b707e6ff45",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/isSymbol": "b3da76c5736896ae117de3cad1acab416da654430b0633bfa280784aa5ec9002",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/isTypedArray.js": "22ce8523fafc400813c7e5dc6a0431d69d85b902c05266442ea6220e7a035155",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/isUndefined": "e09d60068ad2610cdf18e36d2dfb46b643111ad1da730339c85e59df754a6200",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/isWeakMap.js": "fcfa6e0ca9b7e654edc36d457807c677ed105db894613e780eb529e82e1dc412",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/isWeakSet.js": "46a4f5684b5be06f957846baa9efc6cc103a863e941764a01d34b24c68f03206",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/iteratee": "9055bb4450e37cc3e45ae21b9b3e6a4250e37fd362f8845bd0b467b7d118470e",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/join": "e83f5c598cdc1b58bf51c29381e59e39c2968a18c2373b63dac3d88f47190152",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/kebabCase": "31ee12d63385aa251723be025073dbb44e79bf4c3b1aca87bc130801fd4fc4f1",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/keyBy": "4fec34e1ffbc37a22c859b36b5e624d6c4102f1258c8885d04ad9de1344d1d12",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/keys": "18cf4e46f8ea44a7bbd23ede005f3227a743085e117aefd2389f8a13a20095a9",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/keysIn.js": "1f342cf51df02bcee1b64efb7ba92c5bbe2f5ace95c762f2439939c7c4fb8de1",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/last": "f899fd583be1d49b492737882d85a722be10ce778747ba091e5a52f5f3cee0d5",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/lastIndexOf.js": "2e3909d4f5f5efd5130e864fa55dd283faee067b5a021b5fa78f5f2392db01d4",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/lodash.default.js": "e7a7d61e0dfdded617e205145da2135556c23a522fec611b21cb83877351d0cf",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/lowerCase": "667bea5d334a7c5525d3fc96c632b4db90095e66a82999c325829df3261f4aa8",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/lowerFirst.js": "1e30d7494797655483f33a663b0260f47bd1a1f8047427bff9337f5cdb1776f5",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/lt": "88f318d7e1fed8f0d7f413cbdd7f8ebec3a7084ad3aae3b2f9a51d5ef06fc1ed",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/lte": "5a79259a7e5609c63fd47575f670f5b8c0980648910cbb8c35ab32d60cf88197",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/map": "cd2105f2f4aa636ee5d21748b783a7f9eb3fc492f646de0a50ca381a704b602a",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/mapKeys": "14688535243c5a56bca6957847db4c0409782bf0d1b89c236f5c052a51cfda50",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/mapValues": "883c4a6cc12937de1ccb09622e0047faef3f358163be5e3ad6ec73ec6c7e04d1",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/matches.js": "09660e354eca82406b43723ff3f6419a7b6db96edda3083499a09a6ef24621f8",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/matchesProperty.js": "b1b469f1284d5211e1cb6e2fc6fcea38c3c84f7062c1a9c46c01d4c7c1ca239c",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/max": "8d3066190d9ead2ceba4567c41391310bfcd1072d8c078183224d4c8f7407196",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/maxBy": "fd87a7b69ca4aa66e2b9b486ab06ebb44cf835e8279417f2f21f1a1fb7fcd693",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/mean": "d9112b1343e390732f9119aec27b7e0c366a0446b15f42dc19be8096db0a91cd",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/meanBy": "d18b8a7582b3660774b5d8ae958e95cf91e093107e7791e71d070dbc8c13e775",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/memoize": "52b1e8d5e8b23eac69579284a91c0b4e3b6053a7775cf9b256a2af622dbb1109",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/merge": "51ece8b39ab531022a2d1614c14e35a4f9f8dfd918ecc973327fb8b9db6df5de",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/mergeWith": "7953db5ed70d0c214dde7023bcb52d342ef524cbed97602ed2f1ec49bfe2ad35",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/method.js": "1a9266fcfd7d6aa085a014b97cf7142747eec5f0a03bae03571795e74baf1a75",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/methodOf.js": "82a2ea5254872dfa943e81ca07f2a7c6a83b35ff9703abac1d5253f8c8620c64",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/min": "3ae2c7d6dd31f887fdd88ac29e92d9a35710067c98e5a8bf361aeb116028affc",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/minBy": "d47eae2f068d99b69ddde159a20ba364b91cea35821677ac93eb1a446b85fe0a",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/mixin.js": "5f08e4aade37c0dedf813a7129b7c4d11143c8fe3bed0428ffcfda77e533f5bb",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/multiply.js": "0427ccb31697a7c18cdcbe45b36a66c01c738153c71e0f6155048ad5e2aa1051",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/negate.js": "2c2f477799b6a06b011eaf69f04735288e380b40a7bb4ff3dda38a4a55f3fd93",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/next.js": "0df719fe02d42afc21f56bfd19d7a2cf649eafdb4c1413c20955f882567eaf04",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/noop": "6de4e9f36d685ba26b65ed3cf20c358d0e56454dff87f56c12b1e0b634e8adae",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/now": "14b83605a8a699d9e80c843243a7289a4526961b6f7381a818610dcb783d9866",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/nth": "e089c18fc72731b406b5d811da7f97d74d7a42871f9fcb1de3491c38b16a71af",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/nthArg.js": "2f1aa819dc4c87d989dbfef6d9f6e1bb1e3ec0ee1341eda0575986cc4b114e26",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/omit": "f4ec8901fc1e083a68934b1cdebe0077dc9abdd1de804de1f9c8e172a4310a9c",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/omitBy": "a8536c8eacea56fa3b38e5ea2486ccb74bf0b90865d09735e67049a8dc7fcad0",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/once.js": "03681e124fb45eb55f2878852d46dedc5bc2619bd7dc2a6a761b9bcae4f5ac5e",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/orderBy": "1635ee186574cb264addc0966d29705836b161f1fa4f9d04ef8e91155d0ef118",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/over.js": "1c99c9b42647e2f161c883876a7ec7b1c2679fbbcbd94c1e021bcba804dc919e",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/overArgs.js": "4244732ef6c2e224e08b2993ef44895364c95b1ebe9e5b894e6527f6cc4308bc",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/overEvery.js": "feec5f43759f8fa346a0bc2ac704f002e2f210cfda5acd306d68bf6157667aaf",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/overSome.js": "95b782d51da8dfdb8db71c871cdd0bc76ad07306d211aaa1e0a3408642339a5b",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/pad.js": "9d4b2c84495b2b3d8fa37ab666c1b9ff2310af2aa5461931be48e42e75944464",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/padEnd": "19ad106856f54878fedd49485b735fbe59b9b9d01ad04ecec6189bc388bd5868",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/padStart": "0e9495d03198d32fb5bbcf9dd4267d5cf98d43a28ea4282a91e204689c9cae25",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/parseInt.js": "78ff6f4cbb2ed85d56a66ea392d8575e2f41ddfcda6ea123aa1a4fa637e95081",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/partial": "e72e5a700f6fb35501d00e01ddb4d16717db2d33dbb3926cd3a5da156f4e0e83",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/partialRight": "65d425b664665c3fd8dd2fb40a16e62c06551d620756e35e44024e1724950982",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/partition": "e812cd45b6f1743bc62c3da45c493a75245cdc26168c0d6bfdef7201f250dadc",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/pick": "bb8fe879a04c53b387c616d0192647b90c95738b9effbae8a52c3c2f1d1c7845",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/pickBy": "6175c477381e0626e21d7023f8583a813ea2e48f11eab448f84ea1e6bb1646a2",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/plant.js": "1a0096dd0862dc85e38e44b4b7e41a43cce455843f7f74d8dd7400c1028816a0",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/property": "c122bcc2930c91463c08d2a835aefe0819a797e92ae5f4a4a0a1d572467cca15",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/propertyOf.js": "e28cbeb33c45295a8197703f5e61b0fb773cc88401654e44039e2c23ae22b63d",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/pull": "272bdddc8e82fe87df440c724dd6cff3a9936d6b70deee343ff7e952cae39577",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/pullAll": "82a352945ae8a17df7502c4c5b41383eae0f3cc039c6d3d4e8a7d2a65a2b096c",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/pullAllBy.js": "bed0d8f1a22f2bdf2083470c7cbb9d5ce12a8663825150621f58b28506f40ad1",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/pullAllWith.js": "6b0e038ea77957b4ca07604c75c11186577cc3c8c638fc050532d9e8cdca6a62",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/pullAt.js": "22713d053fff928b60bec8b6cc30bdea279022c736c9f69bea3f82c4da8f149e",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/random": "020932ff32cc01550951035844d8f205a2ad871d92fa3c063d19e7d79834f7d4",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/range": "4d786681240aa091b2790b687c22e2dc0b98cfc71aa16040eb12291b393bff13",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/rangeRight.js": "18a15f0a7afaa9ca718752776dba0d143505768870102ad6b5308f7295ab13cf",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/rearg.js": "ff12f4caebd2b5737e4cb1b7d563b075648e6e14bd5cdc830c0b85d243de838f",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/reduce": "24e5a68af293d800509455160a845ff9faa2125140d1d76bd5741e94f29ea05a",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/reduceRight.js": "9d921a3e72cd05d528298f86ef021e2451a945acb56392170d8a0810b788ba2d",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/reject": "cd7275241297d8a7bef75e663d515cb5c4a4516188beae1df07443731173f865",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/remove": "c83d48ae4b94aad679137ac40abd61cbf63f9d9750a232c81381149d3d779688",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/repeat": "0274ef236657832fbc83925b09e7734b735f2e290f5716408575b8a9d4c70d74",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/replace.js": "0821a30151ca933e7f81637493a0392ceb396c8482b15feb99ac788874e59346",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/rest.js": "6afe2ccc293a4efa62a908b73f0db34571a46ff49ec3a485813bdfbe4ae5d8e8",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/result.js": "1de5e24793b0bbdc6076b0c65c70471dd8279e88182c7399eb781a104a657748",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/reverse": "27643bae051dd4a36f460fc6e58231c32685ee8fd5c1e8c7ffcea14bcbc3eb48",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/round": "1524dbba644c752a59ff99b5e262051139958fb6c8f06927986977cc3a472537",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/sample": "8f4403070d93a583b2a14d544f542732c1b32dd3ee8dc14ce9a53969ca4c38f0",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/sampleSize.js": "df25ef16a04a0dbbe39045c8f26c78d4deb0cd93774207f4c6e9bb891749bd15",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/set": "e7b40055c9c28d79a92375056af6425176ac1857ea1512b76b11ddb575d7a798",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/setWith.js": "aa280adb7aa15e16c2f5fea80c5ef97b7994c79b8c3e189e6aab6dd9bf7f80ad",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/shuffle": "bf0eaf7dfa2fd2ff685704e4edd02d294648b85bab771e5f8ea779bc3dc894fb",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/size": "17ed763ec28d468e432cd0ae8f52235e583b8c1fa971486e23e5a0a69f0fcb03",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/slice": "e7a12e77c31d52049966944e2b5cdc85388f6f0fd2aa7d0f77c64affd681eebd",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/snakeCase": "95ce3ed393a2f362b7eae9805e8d276af29be0fd4ec4734a6b82329ad25093aa",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/some": "3d906e134ec9517db0b469323ff12b74c70e884fc4e743b27bc78211048ea6a3",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/sortBy": "c045e5df5d5da48c8ba230745c1c649580144742e8859ef00665289c631b677c",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/sortedIndex.js": "3db7b0d022bcee1d5b63fd047ad84d545d0fc3a8981c542d6c49361cc3b6c224",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/sortedIndexBy.js": "bfd5cb0f5a8066c675bc9a69606dc2d205cbc87722afd84a0af13dd269ec5c38",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/sortedIndexOf.js": "7b888c5791c7bbf1351ab83154f643f79cb7f8a25ea40adf2afa5cb27e9237e5",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/sortedLastIndex.js": "0d7ccfc1fafc5ae96b8a2505c36f02230afdd23f7d7d4cfdeaa4af41b9e4e345",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/sortedLastIndexBy.js": "20d94a6ef13f00c743710c8bd8910ce4df3c6050f75567a8ba23b297a4c43e91",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/sortedLastIndexOf.js": "7dd80643234877fbad42f00cc938f82866b13d834e3ca016cc86aac3eb0b4331",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/sortedUniq": "ca8b11fcb9d7463f2cfae2e5ae5e12498daf73497b93622837bda08babf7049c",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/sortedUniqBy.js": "6c74893752313639c2056a42243b7f549882ba79775237aa4fdc64b1e547103b",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/split": "b8c5bbfb798317625cbe66f1607a40151c6a9d53b447b309da4cd400f7972c53",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/spread.js": "b80f419c750e09f7a7b4cc96ec704c80e46458421e89f50c55a3d188bdc43373",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/startCase": "6df312b3117a76cc7df353a1de942ed48fc2cec59364a41fb07ef7ccf13ad055",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/startsWith": "e5637c64b2920b3f2604a3e7f53afab861fe530d65ea48994682c9f3f916c005",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/stubArray.js": "01c07e5061d6e15dfd25cec5306dd37f37b50b178afab3cafbffb5c77f1986d8",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/stubFalse.js": "6723abc70044d7816db59795b915e37743dc9eafe5a9a79cd42eac11c7d219cc",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/stubObject.js": "96b0edc09e57d90a3e3d7a9e99927790aecd71a9102c97273eaaf47200eea4be",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/stubString.js": "8e6fd930f048db320e2fd73d70d0cfe5bee10947772ce65051d31c0ed760c37b",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/stubTrue.js": "fc9830f6f9e59a63d39f8281baf84142d71b58bb0172ff90087813351a3a90f7",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/subtract.js": "d003a1b9ff4ced49d73a9bc66eea8f34ac87ad65683af34835c462d26fc1e1d3",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/sum": "576a656dd1d1dbc24bbe237ebfce5d0118e196330be8779444f9b4bbe2ccd544",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/sumBy": "e806c0431e1a1783a938172af9b5015aaa57c192ed6c7bae093805b2426aed05",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/tail.js": "04f8773f7ea2f687b2a61acaef7633b4288b45253327e10bd6d9b5cada6dc302",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/take": "ea6a1e801c9ecae9adc4de027b8aa7c4f63089e854c50971820320778a4942f6",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/takeRight": "322b713a5fc47f048644997464ac1cc5cc19636eccd992202d9dadccc5561033",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/takeRightWhile.js": "971ba35d2f5ff9e4983bfe3373331ba2888b3eda09788ff2b8c4e206338fd1b8",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/takeWhile.js": "dd32a518ff1532b01aab342f5101d77c207295074e4bcc9dd274de3d4ecb3611",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/tap.js": "cd345adafe6c1a7f9820d29c3a0cff55fee0439f0b4b3b7dc823b32015ad60b6",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/template": "289486bf71ca9b667b0e0d3ea0396601f291dc9561c762ab922a7d8f484e8741",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/throttle": "23340d6dc5f0cb9655d3bb32250d3dd9b8cfe5cb9939dfd57d454570fa44ed2d",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/thru.js": "cccca5430e533a46d565cac9ab00fc7dff7a1117e740a1a762aeaa62f26a3f07",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/times": "05c829b3a7a71973c36a74727dcb0df08edb4de5d81696691149ca924b58e8e1",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/toArray": "fad1a3ad0cb8023a2615d30b1389036fbc222c81271050de1eca876cf2c62fb6",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/toFinite.js": "5a7a7e5bce9c93ae02031f0007d391f5469b5a1db55a4e59585b9779c483f3c2",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/toInteger": "95f7b7e6d74a50f866467a6c2b1978d18c48ca6c13159e412bba763582c97e41",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/toIterator.js": "44b4e3339cb9418659cd20d4c152467234566e98b90b9e44358b3879087c30e3",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/toJSON.js": "f2c4c71476b504a06747de41da96327e0a797778863a9919f93da03eb64887d2",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/toLength.js": "72844c6c2a22fdf1591c1a06642ee5e122c13d84360726eb9de3488b2f5cc2cd",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/toLower": "96b0fc5648389e49f6fa104e4ed4194e402b37c0687bb3f98e26c4ddaf0b8d11",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/toNumber": "99a8bcedb653be2c84974330861af557a89ab9a20df496ffa462ca6b1d29c716",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/toPairs": "aeb601ac38108e25c6164f94dda6d4c5795745ba2cb69a3173d64139f68c0ccb",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/toPairsIn.js": "4cc0a70ba169a8eef24e9e11ab45858365df7336d7fd462b52d5d8ac42cf01c6",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/toPath": "47497fdffd75215e63081cbaa59e629be96a742012cc46ed671f1d15b7e8e39d",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/toPlainObject.js": "257f6bfc718fe863b186f2aaf4a392e663b4ad52a12ed0fea1fd5865e7bd08dc",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/toSafeInteger": "3d4cf071898ac7e83a48b78d55e9ed55354002480ad3dadc0effbdadeb3658ef",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/toString": "a5312a2efafb718f0c710d955e25320e57e91320b1816858b8009aafdcfadbb1",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/toUpper.js": "23daafa57bb8c979919322d0b748b620a539cb16e7ce5a41b8432f2193e764a6",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/transform": "4b201cbaa96515d6be272af362c0a23c0f7f47ecdc5a2b342c67feff32134723",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/trim": "2e4292ede70c77943fe375b23eb5514de1db4233b3e258061a5a6241207a5ec9",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/trimEnd": "f3a641abdcdfa247cce0bd437c7970678ffaf668b3776b401247c65302b38ad4",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/trimStart": "fe71383b3daf7bac064e02f9f9ec734476747bb35032ce9f08bf36ec95effd80",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/truncate": "336184358996de54e9092b2173cd1e2bd8c063515c0be427cbcf33b9d74b8d26",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/unary.js": "5feac04d9027cfb6c1ba4f3f735903eba4462f88925fea60f93034e8a8e93704",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/unescape": "44766dd869dbddc1ffce574a9cd847320f2e048700cb74bd8aad26dcb7442f97",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/union": "7573090b84056293244fb317c9a636b856f39b7e5a4fb6d791647b30eb3577e9",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/unionBy": "e83e06a936dc9b1cb7f234cfcbdbc9a1a57830e1239346a9a8b20f78bcdcd826",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/unionWith.js": "a19bed55ed4e574c6e3a17bf243e05ff6d722f0567ac0fb69a46e043c424f1ba",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/uniq": "58a4dcc49f0ddc96785c72d7482192f91b8ebeeef14c92157a9e56ca8f5b039c",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/uniqBy": "f4c15d46e3b27d90a61fc365cbea6fbe7d0a3a318b0cbf1c8e7d910d5aa41b1e",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/uniqWith": "aa15983fd0b8ab3d04f0b6e91e587cbe1879d819c024a5aba74fcac9f795725e",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/uniqueId": "dbf44bce3a3259637a3c9e1b028d31fd8aab2685b8abeb1faa031993713622d7",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/unset": "8966d97bcdd5adc1c349a492a7ff42ce27512d00b54ad76e8ade50a0ab1ee342",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/unzip": "595861857a606d5d58dd74144c6a8c15f40983161199f5b596ca6353f4a0c852",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/unzipWith.js": "e09a67f7a31750bea4630c4d607014ac968f486e71b779a960ea680506ce4b0c",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/update.js": "85d4b78b0e822edbd0eb7736ced53c629c3c988b92975b195110a671ae7f4df8",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/updateWith.js": "d7ff72a422299ccf1c7e05a44333e00dbfa11f053ffdca423250a3db861aa319",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/upperCase": "c432a8ac9ed0dad24a4e4df4e2ffbf60352e19f8dee40cdd2ffddade8972171c",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/upperFirst": "600910c104a63b26c75fffabd807b5a3d839eb5b9e567c29c42762d591b99b75",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/value.js": "f2c4c71476b504a06747de41da96327e0a797778863a9919f93da03eb64887d2",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/valueOf.js": "f2c4c71476b504a06747de41da96327e0a797778863a9919f93da03eb64887d2",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/values": "49278417cefc379cff0bdd0e1b21d196136591e8f0f9ee2d6aadafde2b5cd03c",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/valuesIn.js": "22a998315fac7e36c37b8573cf6ef6578acf0393b35724b8c68fb5e897b39040",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/without": "61631aa957e30468385a43b8543f92dc5f45109af754e173b34ce039074f66ce",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/words": "637192d60f7599cf3eb4f8d64a32d80041819bfd6bfea62e5de51f618092234c",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/wrap.js": "4a46cfc19144c9c0d751fe65fc0129900df6bff64459c7bd64bfe8f37b8b5836",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/wrapperAt.js": "ebdf7dfe6515d56a2485bc5472580496ad918d1bfbe44d08e394bff60cec4b7a",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/wrapperChain.js": "54460671cef771f5bc42946302639505aca21dd48434f46c258f24ac4f950cd5",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/wrapperLodash.js": "9b202a80e7b1963facc2bfdf4b1c636e0c37e76ec336b5cf98b54038abf55ae2",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/wrapperReverse.js": "af14be24b2ddce246c0e979c6e1a33e13a805986cb61d648b5fbc346535574e0",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/xor.js": "97e897e2090c3e759c922b09ec722f851e6270762883157448ce0f361aa90c3a",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/xorBy.js": "3cc987d57c8e3d1e416222821826bd6bdfe8218a45aaf1ba40556cf64aff9629",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/xorWith.js": "27890d393d4b15947b703cf141d7b48be398f7443a0c2f2c8d44e27c71900975",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/zip": "ff1ff54d8b036388ac7e202c81ff1e3e867dcbde158b724e19cdf1e9e9c59e2a",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/zipObject": "b2d67732bd69d97113b64c7c1b6bec4372c28261ed078d2cd0e9e9bc33bdff83",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/zipObjectDeep": "c8e198647a365be25eb3f413104bb36b8e105d8058ce06b9440487ed00773dc5",
|
||||
"https://jspm.dev/npm:lodash-es@4.17.21/zipWith": "4d329d4b574b05475659fda0400262007a2b4555ea6a08ca4b110783ec3489b0",
|
||||
"https://jspm.dev/npm:uuid@9.0.0": "97f0953723efa7b59f8e817d29e17829e5ca65f84ad0ed307bf2a01d4527885e",
|
||||
"https://jspm.dev/uuid": "f0e9c7616b2fcc3874269405b7ee0f63a0e8e9501a0dae44005006cd5ff019a6"
|
||||
}
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
{
|
||||
"name": "deno-vless",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"projectType": "application",
|
||||
"sourceRoot": "apps/deno-vless/src",
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nrwl/deno:bundle",
|
||||
"outputs": ["dist/apps/deno-vless"],
|
||||
"options": {
|
||||
"main": "apps/deno-vless/src/main.ts",
|
||||
"outputFile": "dist/apps/deno-vless/main.js",
|
||||
"denoConfig": "apps/deno-vless/deno.json"
|
||||
}
|
||||
},
|
||||
"serve": {
|
||||
"executor": "@nrwl/deno:run",
|
||||
"options": {
|
||||
"buildTarget": "deno-vless:build",
|
||||
"watch": true
|
||||
}
|
||||
},
|
||||
"deno-bunled": {
|
||||
"executor": "nx:run-commands",
|
||||
"options": {
|
||||
"cwd": "apps/deno-vless",
|
||||
"command": "deno bundle src/main.ts deno-bunled.js"
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"executor": "@nrwl/deno:test",
|
||||
"outputs": ["coverage/apps/deno-vless"],
|
||||
"options": {
|
||||
"coverageDirectory": "coverage/apps/deno-vless",
|
||||
"denoConfig": "apps/deno-vless/deno.json"
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nrwl/deno:lint",
|
||||
"options": {
|
||||
"denoConfig": "apps/deno-vless/deno.json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"implicitDependencies": ["cf-page-vless"],
|
||||
"tags": []
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
async function serveClient(req: Request, basePath: string) {
|
||||
const url = new URL(req.url)
|
||||
if (url.pathname.startsWith('/assets') || url.pathname.includes(basePath)) {
|
||||
// const resp = await serveDir(req, {
|
||||
// fsRoot: `${Deno.cwd()}/dist/apps/cf-page`,
|
||||
// });
|
||||
// resp.headers.set('cache-control', 'public, max-age=2592000');
|
||||
let targetUrl = `https://raw.githubusercontent.com/zizifn/edgetunnel/main/dist/apps/cf-page${url.pathname}`;
|
||||
if(url.pathname.includes(basePath)){
|
||||
targetUrl = `https://raw.githubusercontent.com/zizifn/edgetunnel/main/dist/apps/cf-page/index.html`;
|
||||
}
|
||||
console.log(targetUrl)
|
||||
const resp = await fetch(targetUrl);
|
||||
const modifiedHeaders = new Headers(resp.headers);
|
||||
modifiedHeaders.delete('content-security-policy');
|
||||
if(url.pathname.endsWith('.js')){
|
||||
modifiedHeaders.set('content-type', 'application/javascript');
|
||||
}else if(url.pathname.endsWith('.css')){
|
||||
modifiedHeaders.set('content-type', 'text/css');
|
||||
}else if(url.pathname.includes(basePath)){
|
||||
modifiedHeaders.set('content-type', 'text/html; charset=utf-8');
|
||||
|
||||
}
|
||||
return new Response(
|
||||
resp.body,
|
||||
{
|
||||
status: resp.status,
|
||||
headers: modifiedHeaders
|
||||
}
|
||||
);
|
||||
}
|
||||
const basicAuth = req.headers.get('Authorization') || '';
|
||||
const authString = basicAuth.split(' ')?.[1] || '';
|
||||
if (atob(authString).includes(basePath)) {
|
||||
console.log('302');
|
||||
return new Response(``, {
|
||||
status: 302,
|
||||
headers: {
|
||||
'content-type': 'text/html; charset=utf-8',
|
||||
Location: `./${basePath}`,
|
||||
},
|
||||
});
|
||||
} else {
|
||||
return new Response(``, {
|
||||
status: 401,
|
||||
headers: {
|
||||
'content-type': 'text/html; charset=utf-8',
|
||||
'WWW-Authenticate': 'Basic',
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export { serveClient };
|
||||
@@ -1,234 +0,0 @@
|
||||
import { serve } from 'https://deno.land/std@0.170.0/http/server.ts';
|
||||
import * as uuid from 'https://jspm.dev/uuid';
|
||||
import { serveClient } from './client.ts';
|
||||
import {
|
||||
safeCloseWebSocket,
|
||||
delay,
|
||||
makeReadableWebSocketStream,
|
||||
processVlessHeader,
|
||||
} from 'vless-js';
|
||||
|
||||
const userID = Deno.env.get('UUID') || '';
|
||||
let isVaildUser = uuid.validate(userID);
|
||||
if (!isVaildUser) {
|
||||
console.log('not set valid UUID');
|
||||
}
|
||||
|
||||
const handler = async (req: Request): Promise<Response> => {
|
||||
if (!isVaildUser) {
|
||||
const index401 = await Deno.readFile(
|
||||
`${Deno.cwd()}/dist/apps/cf-page/401.html`
|
||||
);
|
||||
return new Response(index401, {
|
||||
status: 401,
|
||||
headers: {
|
||||
'content-type': 'text/html; charset=utf-8',
|
||||
},
|
||||
});
|
||||
}
|
||||
const upgrade = req.headers.get('upgrade') || '';
|
||||
if (upgrade.toLowerCase() != 'websocket') {
|
||||
return await serveClient(req, userID);
|
||||
}
|
||||
const { socket, response } = Deno.upgradeWebSocket(req);
|
||||
socket.addEventListener('open', () => {});
|
||||
|
||||
// let test: Deno.TcpConn | null = null;
|
||||
// test!.writable.abort();
|
||||
//
|
||||
const earlyDataHeader = req.headers.get('sec-websocket-protocol') || '';
|
||||
|
||||
processWebSocket({
|
||||
userID,
|
||||
webSocket: socket,
|
||||
earlyDataHeader,
|
||||
// rawTCPFactory: (port: number, hostname: string) => {
|
||||
// return Deno.connect({
|
||||
// port,
|
||||
// hostname,
|
||||
// });
|
||||
// },
|
||||
});
|
||||
return response;
|
||||
};
|
||||
|
||||
async function processWebSocket({
|
||||
userID,
|
||||
webSocket,
|
||||
earlyDataHeader,
|
||||
}: // libs: { uuid, lodash },
|
||||
{
|
||||
userID: string;
|
||||
webSocket: WebSocket;
|
||||
earlyDataHeader: string;
|
||||
// rawTCPFactory: (port: number, hostname: string) => Promise<any>;
|
||||
// libs: { uuid: any; lodash: any };
|
||||
}) {
|
||||
let address = '';
|
||||
let portWithRandomLog = '';
|
||||
let remoteConnection: {
|
||||
readable: any;
|
||||
writable: any;
|
||||
write: (arg0: Uint8Array) => any;
|
||||
close: () => void;
|
||||
} | null = null;
|
||||
let remoteConnectionReadyResolve: Function;
|
||||
try {
|
||||
const log = (info: string, event?: any) => {
|
||||
console.log(`[${address}:${portWithRandomLog}] ${info}`, event || '');
|
||||
};
|
||||
const readableWebSocketStream = makeReadableWebSocketStream(
|
||||
webSocket,
|
||||
earlyDataHeader,
|
||||
log
|
||||
);
|
||||
let vlessResponseHeader: Uint8Array | null = null;
|
||||
|
||||
// ws --> remote
|
||||
readableWebSocketStream
|
||||
.pipeTo(
|
||||
new WritableStream({
|
||||
async write(chunk, controller) {
|
||||
const vlessBuffer = chunk;
|
||||
if (remoteConnection) {
|
||||
const number = await remoteConnection.write(
|
||||
new Uint8Array(vlessBuffer)
|
||||
);
|
||||
return;
|
||||
}
|
||||
const {
|
||||
hasError,
|
||||
message,
|
||||
portRemote,
|
||||
addressRemote,
|
||||
rawDataIndex,
|
||||
vlessVersion,
|
||||
isUDP,
|
||||
} = processVlessHeader(vlessBuffer, userID);
|
||||
address = addressRemote || '';
|
||||
portWithRandomLog = `${portRemote}--${Math.random()}`;
|
||||
if (isUDP) {
|
||||
console.log('udp');
|
||||
controller.error(
|
||||
`[${address}:${portWithRandomLog}] command udp is not support `
|
||||
);
|
||||
return;
|
||||
}
|
||||
if (hasError) {
|
||||
controller.error(`[${address}:${portWithRandomLog}] ${message} `);
|
||||
}
|
||||
// const addressType = requestAddr >> 4;
|
||||
// const addressLength = requestAddr & 0x0f;
|
||||
console.log(`[${address}:${portWithRandomLog}] connecting`);
|
||||
remoteConnection = await Deno.connect({
|
||||
port: portRemote!,
|
||||
hostname: address,
|
||||
});
|
||||
vlessResponseHeader = new Uint8Array([vlessVersion![0], 0]);
|
||||
const rawClientData = vlessBuffer.slice(rawDataIndex!);
|
||||
await remoteConnection!.write(new Uint8Array(rawClientData));
|
||||
remoteConnectionReadyResolve(remoteConnection);
|
||||
},
|
||||
close() {
|
||||
console.log(
|
||||
`[${address}:${portWithRandomLog}] readableWebSocketStream is close`
|
||||
);
|
||||
},
|
||||
abort(reason) {
|
||||
console.log(
|
||||
`[${address}:${portWithRandomLog}] readableWebSocketStream is abort`,
|
||||
JSON.stringify(reason)
|
||||
);
|
||||
},
|
||||
})
|
||||
)
|
||||
.catch((error) => {
|
||||
console.error(
|
||||
`[${address}:${portWithRandomLog}] readableWebSocketStream pipeto has exception`,
|
||||
error.stack || error
|
||||
);
|
||||
// error is cancel readable stream anyway, no need close websocket in here
|
||||
// safeCloseWebSocket(webSocket);
|
||||
// close remote conn
|
||||
// remoteConnection?.close();
|
||||
});
|
||||
await new Promise((resolve) => (remoteConnectionReadyResolve = resolve));
|
||||
let remoteChunkCount = 0;
|
||||
let totoal = 0;
|
||||
// remote --> ws
|
||||
await remoteConnection!.readable.pipeTo(
|
||||
new WritableStream({
|
||||
start() {
|
||||
if (webSocket.readyState === webSocket.OPEN) {
|
||||
webSocket.send(vlessResponseHeader!);
|
||||
}
|
||||
},
|
||||
async write(chunk: Uint8Array, controller) {
|
||||
function send2WebSocket() {
|
||||
if (webSocket.readyState !== webSocket.OPEN) {
|
||||
controller.error(
|
||||
`can't accept data from remoteConnection!.readable when client webSocket is close early`
|
||||
);
|
||||
return;
|
||||
}
|
||||
webSocket.send(chunk);
|
||||
}
|
||||
|
||||
remoteChunkCount++;
|
||||
//#region
|
||||
// console.log(
|
||||
// `${(totoal +=
|
||||
// chunk.length)}, count: ${remoteChunkCount.toString()}, ${
|
||||
// chunk.length
|
||||
// }`
|
||||
// );
|
||||
// https://github.com/zizifn/edgetunnel/issues/87, hack for this issue, maybe websocket sent too many small chunk,
|
||||
// casue v2ray client can't process https://github.com/denoland/deno/issues/17332
|
||||
// limit X number count / bandwith, due to deno can't read bufferedAmount in deno,
|
||||
// this is deno bug and this will not need in nodejs version
|
||||
//#endregion
|
||||
if (remoteChunkCount < 20) {
|
||||
send2WebSocket();
|
||||
} else if (remoteChunkCount < 120) {
|
||||
await delay(10); // 64kb * 100 = 6m/s
|
||||
send2WebSocket();
|
||||
} else if (remoteChunkCount < 500) {
|
||||
await delay(20); // (64kb * 1000/20) = 3m/s
|
||||
send2WebSocket();
|
||||
} else {
|
||||
await delay(50); // (64kb * 1000/50) /s
|
||||
send2WebSocket();
|
||||
}
|
||||
},
|
||||
close() {
|
||||
console.log(
|
||||
`[${address}:${portWithRandomLog}] remoteConnection!.readable is close`
|
||||
);
|
||||
},
|
||||
abort(reason) {
|
||||
safeCloseWebSocket(webSocket);
|
||||
console.error(
|
||||
`[${address}:${portWithRandomLog}] remoteConnection!.readable abort`,
|
||||
reason
|
||||
);
|
||||
},
|
||||
})
|
||||
);
|
||||
} catch (error: any) {
|
||||
console.error(
|
||||
`[${address}:${portWithRandomLog}] processWebSocket has exception `,
|
||||
error.stack || error
|
||||
);
|
||||
safeCloseWebSocket(webSocket);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
globalThis.addEventListener('beforeunload', (e) => {
|
||||
console.log('About to exit...');
|
||||
});
|
||||
|
||||
globalThis.addEventListener('unload', (e) => {
|
||||
console.log('Exiting');
|
||||
});
|
||||
serve(handler, { port: 8080, hostname: '0.0.0.0' });
|
||||
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"extends": ["../../.eslintrc.json"],
|
||||
"ignorePatterns": ["!**/*"],
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
"files": ["*.ts", "*.tsx"],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
"files": ["*.js", "*.jsx"],
|
||||
"rules": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
/* eslint-disable */
|
||||
export default {
|
||||
displayName: 'node-vless',
|
||||
preset: '../../jest.preset.js',
|
||||
globals: {},
|
||||
testEnvironment: 'node',
|
||||
transform: {
|
||||
'^.+\\.[tj]s$': [
|
||||
'ts-jest',
|
||||
{
|
||||
tsconfig: '<rootDir>/tsconfig.spec.json',
|
||||
},
|
||||
],
|
||||
},
|
||||
moduleFileExtensions: ['ts', 'js', 'html'],
|
||||
coverageDirectory: '../../coverage/apps/node-vless',
|
||||
};
|
||||
@@ -1,65 +0,0 @@
|
||||
{
|
||||
"name": "node-vless",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "apps/node-vless/src",
|
||||
"projectType": "application",
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nx/webpack:webpack",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"target": "node",
|
||||
"compiler": "tsc",
|
||||
"outputPath": "dist/apps/node-vless",
|
||||
"main": "apps/node-vless/src/main.ts",
|
||||
"tsConfig": "apps/node-vless/tsconfig.app.json",
|
||||
"assets": ["apps/node-vless/src/assets"],
|
||||
"webpackConfig": "apps/node-vless/webpack.config.js",
|
||||
"isolatedConfig": true,
|
||||
"babelUpwardRootMode": true,
|
||||
"sourceMap": true
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"optimization": true,
|
||||
"extractLicenses": true,
|
||||
"inspect": false,
|
||||
"fileReplacements": [
|
||||
{
|
||||
"replace": "apps/node-vless/src/environments/environment.ts",
|
||||
"with": "apps/node-vless/src/environments/environment.prod.ts"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"serve": {
|
||||
"executor": "@nx/js:node",
|
||||
"options": {
|
||||
"buildTarget": "node-vless:build"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"buildTarget": "node-vless:build:production"
|
||||
}
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nx/linter:eslint",
|
||||
"outputs": ["{options.outputFile}"],
|
||||
"options": {
|
||||
"lintFilePatterns": ["apps/node-vless/**/*.ts"]
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"executor": "@nx/jest:jest",
|
||||
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
||||
"options": {
|
||||
"jestConfig": "apps/node-vless/jest.config.ts",
|
||||
"passWithNoTests": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"implicitDependencies": ["cf-page-vless"],
|
||||
"tags": []
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
import { createReadStream, existsSync } from 'node:fs';
|
||||
import { IncomingMessage, ServerResponse } from 'node:http';
|
||||
import { resolve, join, extname } from 'node:path';
|
||||
import { cacheHeader } from 'pretty-cache-header';
|
||||
|
||||
const mimeLookup = {
|
||||
'.js': 'application/javascript,charset=UTF-8',
|
||||
'.html': 'text/html,charset=UTF-8',
|
||||
'.css': 'text/css; charset=UTF-8',
|
||||
};
|
||||
const staticPath = 'dist/apps/cf-page/';
|
||||
const file401 = 'dist/apps/node-vless/assets/401.html';
|
||||
let filepath = null;
|
||||
export function serverStaticFile(req: IncomingMessage, resp: ServerResponse) {
|
||||
const url = new URL(req.url, `http://${req.headers['host']}`);
|
||||
let fileurl = url.pathname;
|
||||
fileurl = join(staticPath, fileurl);
|
||||
console.log('....', fileurl);
|
||||
filepath = resolve(fileurl);
|
||||
console.log(filepath);
|
||||
|
||||
if (existsSync(filepath)) {
|
||||
let fileExt = extname(filepath);
|
||||
console.log('fileExt', fileExt);
|
||||
let mimeType = mimeLookup[fileExt];
|
||||
|
||||
resp.writeHead(200, {
|
||||
'Content-Type': mimeType,
|
||||
'Cache-Control': cacheHeader({
|
||||
public: true,
|
||||
maxAge: '1year',
|
||||
staleWhileRevalidate: '1year',
|
||||
}),
|
||||
});
|
||||
return createReadStream(filepath).pipe(resp);
|
||||
} else {
|
||||
resp.writeHead(404);
|
||||
resp.write('not found');
|
||||
resp.end();
|
||||
return resp;
|
||||
}
|
||||
}
|
||||
|
||||
export function index401(req: IncomingMessage, resp: ServerResponse) {
|
||||
const file401Path = resolve(file401);
|
||||
if (existsSync(file401Path)) {
|
||||
createReadStream(file401Path).pipe(resp);
|
||||
} else {
|
||||
resp.writeHead(401);
|
||||
resp.write('UUID env not set');
|
||||
resp.end();
|
||||
}
|
||||
}
|
||||
|
||||
export function serverIndexPage(
|
||||
req: IncomingMessage,
|
||||
resp: ServerResponse,
|
||||
uuid
|
||||
) {
|
||||
// if()
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>401 - UUID Not Valid</title>
|
||||
</head>
|
||||
|
||||
|
||||
<body>
|
||||
<h1 style="color: red;">Not set valid UUID in Environment Variables.</h1>
|
||||
<h2>Please use tool to generate and <span style="color: red;">remember</span> UUID or use this one <span
|
||||
style="color: blue;" id="uuidSpan"></span>
|
||||
</h2>
|
||||
<h3> You must use same UUID for login this page after config valid UUID Environment Variables
|
||||
</h3>
|
||||
<h2>Please refer to <a
|
||||
href="https://github.com/zizifn/edgetunnel/blob/main/doc/edge-tunnel-deno.md#%E6%B5%81%E7%A8%8B%E6%BC%94%E7%A4%BA">deno
|
||||
deploy guide</a>
|
||||
</h2>
|
||||
|
||||
<h3>Or maybe check below <a
|
||||
href="https://raw.githubusercontent.com/zizifn/edgetunnel/main/doc/deno-deploy2.gif">GIF</a> </h3>
|
||||
<img src="https://raw.githubusercontent.com/zizifn/edgetunnel/main/doc/deno-deploy2.gif" alt="guide" srcset="">
|
||||
<script>
|
||||
let uuid = URL.createObjectURL(new Blob([])).substr(-36);
|
||||
document.getElementById('uuidSpan').textContent = uuid
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -1,3 +0,0 @@
|
||||
export const environment = {
|
||||
production: true,
|
||||
};
|
||||
@@ -1,3 +0,0 @@
|
||||
export const environment = {
|
||||
production: false,
|
||||
};
|
||||
@@ -1,409 +0,0 @@
|
||||
import { createServer } from 'http';
|
||||
import { parse } from 'url';
|
||||
import { WebSocketServer, WebSocket } from 'ws';
|
||||
import { index401, serverStaticFile } from './app/utils';
|
||||
import { validate } from 'uuid';
|
||||
import { createReadStream } from 'node:fs';
|
||||
import { setDefaultResultOrder } from 'node:dns';
|
||||
import { createSocket, Socket as UDPSocket } from 'node:dgram';
|
||||
|
||||
import {
|
||||
makeReadableWebSocketStream,
|
||||
processVlessHeader,
|
||||
delay,
|
||||
closeWebSocket,
|
||||
} from 'vless-js';
|
||||
import { connect, Socket } from 'node:net';
|
||||
import { Duplex, Readable, Writable } from 'stream';
|
||||
import {
|
||||
TransformStream,
|
||||
ReadableStream,
|
||||
WritableStream,
|
||||
} from 'node:stream/web';
|
||||
const port = process.env.PORT;
|
||||
const smallRAM = process.env.SMALLRAM || false;
|
||||
const userID = process.env.UUID || '';
|
||||
//'ipv4first' or 'verbatim'
|
||||
const dnOder = process.env.DNSORDER || 'verbatim';
|
||||
if (dnOder === 'ipv4first') {
|
||||
setDefaultResultOrder(dnOder);
|
||||
}
|
||||
|
||||
let isVaildUser = validate(userID);
|
||||
if (!isVaildUser) {
|
||||
console.log('not set valid UUID');
|
||||
}
|
||||
|
||||
const server = createServer((req, resp) => {
|
||||
if (!isVaildUser) {
|
||||
return index401(req, resp);
|
||||
}
|
||||
const url = new URL(req.url, `http://${req.headers['host']}`);
|
||||
// health check
|
||||
if (req.method === 'GET' && url.pathname.startsWith('/health')) {
|
||||
resp.writeHead(200);
|
||||
resp.write('health 200');
|
||||
resp.end();
|
||||
return;
|
||||
}
|
||||
|
||||
// index page
|
||||
if (url.pathname.includes(userID)) {
|
||||
const index = 'dist/apps/cf-page/index.html';
|
||||
resp.writeHead(200, {
|
||||
'Content-Type': 'text/html,charset=UTF-8',
|
||||
});
|
||||
return createReadStream(index).pipe(resp);
|
||||
}
|
||||
if (req.method === 'GET' && url.pathname.startsWith('/assets')) {
|
||||
return serverStaticFile(req, resp);
|
||||
}
|
||||
|
||||
const basicAuth = req.headers.authorization || '';
|
||||
const authStringBase64 = basicAuth.split(' ')?.[1] || '';
|
||||
const authString = Buffer.from(authStringBase64, 'base64').toString('ascii');
|
||||
if (authString && authString.includes(userID)) {
|
||||
resp.writeHead(302, {
|
||||
'content-type': 'text/html; charset=utf-8',
|
||||
Location: `./${userID}`,
|
||||
});
|
||||
resp.end();
|
||||
} else {
|
||||
resp.writeHead(401, {
|
||||
'content-type': 'text/html; charset=utf-8',
|
||||
'WWW-Authenticate': 'Basic',
|
||||
});
|
||||
resp.end();
|
||||
}
|
||||
});
|
||||
const vlessWServer = new WebSocketServer({ noServer: true });
|
||||
|
||||
vlessWServer.on('connection', async function connection(ws, request) {
|
||||
let address = '';
|
||||
let portWithRandomLog = '';
|
||||
try {
|
||||
const log = (info: string, event?: any) => {
|
||||
console.log(`[${address}:${portWithRandomLog}] ${info}`, event || '');
|
||||
};
|
||||
let remoteConnection: Duplex = null;
|
||||
let udpClientStream: TransformStream = null;
|
||||
let remoteConnectionReadyResolve: Function;
|
||||
const earlyDataHeader = request.headers['sec-websocket-protocol'];
|
||||
const readableWebSocketStream = makeReadableWebSocketStream(
|
||||
ws,
|
||||
earlyDataHeader,
|
||||
log
|
||||
);
|
||||
let vlessResponseHeader: Uint8Array | null = null;
|
||||
|
||||
// ws --> remote
|
||||
readableWebSocketStream
|
||||
.pipeTo(
|
||||
new WritableStream({
|
||||
async write(chunk: Buffer, controller) {
|
||||
if (!Buffer.isBuffer(chunk)) {
|
||||
chunk = Buffer.from(chunk);
|
||||
}
|
||||
if (udpClientStream) {
|
||||
const writer = udpClientStream.writable.getWriter();
|
||||
// nodejs buffer to ArrayBuffer issue
|
||||
// https://nodejs.org/dist/latest-v18.x/docs/api/buffer.html#bufbuffer
|
||||
await writer.write(
|
||||
chunk.buffer.slice(
|
||||
chunk.byteOffset,
|
||||
chunk.byteOffset + chunk.length
|
||||
)
|
||||
);
|
||||
writer.releaseLock();
|
||||
return;
|
||||
}
|
||||
if (remoteConnection) {
|
||||
await socketAsyncWrite(remoteConnection, chunk);
|
||||
// remoteConnection.write(chunk);
|
||||
return;
|
||||
}
|
||||
const vlessBuffer = chunk.buffer.slice(
|
||||
chunk.byteOffset,
|
||||
chunk.byteOffset + chunk.length
|
||||
);
|
||||
const {
|
||||
hasError,
|
||||
message,
|
||||
portRemote,
|
||||
addressRemote,
|
||||
rawDataIndex,
|
||||
vlessVersion,
|
||||
isUDP,
|
||||
} = processVlessHeader(vlessBuffer, userID);
|
||||
address = addressRemote || '';
|
||||
portWithRandomLog = `${portRemote}--${Math.random()} ${
|
||||
isUDP ? 'udp ' : 'tcp '
|
||||
} `;
|
||||
if (hasError) {
|
||||
controller.error(`[${address}:${portWithRandomLog}] ${message} `);
|
||||
return;
|
||||
}
|
||||
// const addressType = requestAddr >> 42
|
||||
// const addressLength = requestAddr & 0x0f;
|
||||
console.log(`[${address}:${portWithRandomLog}] connecting`);
|
||||
vlessResponseHeader = new Uint8Array([vlessVersion![0], 0]);
|
||||
const rawClientData = vlessBuffer.slice(rawDataIndex!);
|
||||
if (isUDP) {
|
||||
// 如果仅仅是针对DNS, 这样是没有必要的。因为xray 客户端 DNS A/AAA query 都有长度 header,
|
||||
// 所以直接和 DNS server over TCP。所以无需 runtime 支持 UDP API。
|
||||
// DNS over UDP 和 TCP 唯一的区别就是 Header section format 多了长度
|
||||
// https://www.rfc-editor.org/rfc/rfc1035#section-4.2.2
|
||||
udpClientStream = makeUDPSocketStream(portRemote, address);
|
||||
const writer = udpClientStream.writable.getWriter();
|
||||
writer.write(rawClientData).catch((error) => console.log);
|
||||
writer.releaseLock();
|
||||
remoteConnectionReadyResolve(udpClientStream);
|
||||
} else {
|
||||
remoteConnection = await connect2Remote(portRemote, address, log);
|
||||
remoteConnection.write(new Uint8Array(rawClientData));
|
||||
remoteConnectionReadyResolve(remoteConnection);
|
||||
}
|
||||
},
|
||||
close() {
|
||||
// if (udpClientStream ) {
|
||||
// udpClientStream.writable.close();
|
||||
// }
|
||||
// (remoteConnection as Socket).end();
|
||||
console.log(
|
||||
`[${address}:${portWithRandomLog}] readableWebSocketStream is close`
|
||||
);
|
||||
},
|
||||
abort(reason) {
|
||||
// TODO: log can be remove, abort will catch by catch block
|
||||
console.log(
|
||||
`[${address}:${portWithRandomLog}] readableWebSocketStream is abort`,
|
||||
JSON.stringify(reason)
|
||||
);
|
||||
},
|
||||
})
|
||||
)
|
||||
.catch((error) => {
|
||||
console.error(
|
||||
`[${address}:${portWithRandomLog}] readableWebSocketStream pipeto has exception`,
|
||||
error.stack || error
|
||||
);
|
||||
// error is cancel readable stream anyway, no need close websocket in here
|
||||
// closeWebSocket(webSocket);
|
||||
// close remote conn
|
||||
// remoteConnection?.close();
|
||||
});
|
||||
|
||||
await new Promise((resolve) => (remoteConnectionReadyResolve = resolve));
|
||||
// remote --> ws
|
||||
let responseStream = udpClientStream?.readable;
|
||||
if (remoteConnection) {
|
||||
// ignore type error
|
||||
// @ts-ignore
|
||||
responseStream = Readable.toWeb(remoteConnection, {
|
||||
strategy: {
|
||||
// due to nodejs issue https://github.com/nodejs/node/issues/46347
|
||||
highWaterMark: smallRAM ? 100 : 1000, // 1000 * tcp mtu(64kb) = 64mb
|
||||
},
|
||||
});
|
||||
}
|
||||
let count = 0;
|
||||
|
||||
// ws.send(vlessResponseHeader!);
|
||||
// remoteConnection.pipe(
|
||||
// new Writable({
|
||||
// async write(chunk: Uint8Array, encoding, callback) {
|
||||
// count += chunk.byteLength;
|
||||
// console.log('ws write', count / (1024 * 1024));
|
||||
// console.log(
|
||||
// '-----++++',
|
||||
// (remoteConnection as Socket).bytesRead / (1024 * 1024)
|
||||
// );
|
||||
// if (ws.readyState === ws.OPEN) {
|
||||
// await wsAsyncWrite(ws, chunk);
|
||||
// callback();
|
||||
// }
|
||||
// },
|
||||
// })
|
||||
// );
|
||||
// if readable not pipe can't wait fro writeable write method
|
||||
await responseStream.pipeTo(
|
||||
new WritableStream({
|
||||
start() {
|
||||
if (ws.readyState === ws.OPEN) {
|
||||
ws.send(vlessResponseHeader!);
|
||||
}
|
||||
},
|
||||
async write(chunk: Uint8Array, controller) {
|
||||
// count += chunk.byteLength;
|
||||
// console.log('ws write', count / (1024 * 1024));
|
||||
// console.log(
|
||||
// '-----++++',
|
||||
// (remoteConnection as Socket).bytesRead / (1024 * 1024),
|
||||
// (remoteConnection as Socket).readableHighWaterMark
|
||||
// );
|
||||
// we have issue there, maybe beacsue nodejs web stream has bug.
|
||||
// socket web stream will read more data from socket
|
||||
if (ws.readyState === ws.OPEN) {
|
||||
await wsAsyncWrite(ws, chunk);
|
||||
} else {
|
||||
if (!(remoteConnection as Socket).destroyed) {
|
||||
(remoteConnection as Socket).destroy();
|
||||
}
|
||||
}
|
||||
},
|
||||
close() {
|
||||
console.log(
|
||||
`[${address}:${portWithRandomLog}] remoteConnection!.readable is close`
|
||||
);
|
||||
},
|
||||
abort(reason) {
|
||||
closeWebSocket(ws);
|
||||
console.error(
|
||||
`[${address}:${portWithRandomLog}] remoteConnection!.readable abort`,
|
||||
reason
|
||||
);
|
||||
},
|
||||
})
|
||||
);
|
||||
} catch (error) {
|
||||
console.error(
|
||||
`[${address}:${portWithRandomLog}] processWebSocket has exception `,
|
||||
error.stack || error
|
||||
);
|
||||
closeWebSocket(ws);
|
||||
}
|
||||
});
|
||||
|
||||
server.on('upgrade', function upgrade(request, socket, head) {
|
||||
const { pathname } = parse(request.url);
|
||||
|
||||
vlessWServer.handleUpgrade(request, socket, head, function done(ws) {
|
||||
vlessWServer.emit('connection', ws, request);
|
||||
});
|
||||
});
|
||||
|
||||
server.listen(
|
||||
{
|
||||
port: port,
|
||||
host: '::',
|
||||
// host: '0.0.0.0',
|
||||
},
|
||||
() => {
|
||||
console.log(`server listen in http://127.0.0.1:${port}`);
|
||||
}
|
||||
);
|
||||
|
||||
async function connect2Remote(port, host, log: Function): Promise<Socket> {
|
||||
return new Promise((resole, reject) => {
|
||||
const remoteSocket = connect(
|
||||
{
|
||||
port: port,
|
||||
host: host,
|
||||
// https://github.com/nodejs/node/pull/46587
|
||||
// autoSelectFamily: true,
|
||||
},
|
||||
() => {
|
||||
log(`connected`);
|
||||
resole(remoteSocket);
|
||||
}
|
||||
);
|
||||
remoteSocket.addListener('error', () => {
|
||||
reject('remoteSocket has error');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
async function socketAsyncWrite(ws: Duplex, chunk: Buffer) {
|
||||
return new Promise((resolve, reject) => {
|
||||
ws.write(chunk, (error) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
resolve('');
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
async function wsAsyncWrite(ws: WebSocket, chunk: Uint8Array) {
|
||||
return new Promise((resolve, reject) => {
|
||||
ws.send(chunk, (error) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
resolve('');
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function makeUDPSocketStream(portRemote, address) {
|
||||
const udpClient = createSocket('udp4');
|
||||
const transformStream = new TransformStream({
|
||||
start(controller) {
|
||||
/* … */
|
||||
udpClient.on('message', (message, info) => {
|
||||
// console.log(
|
||||
// `udp package received ${info.size} bytes from ${info.address}:${info.port}`,
|
||||
// Buffer.from(message).toString('hex')
|
||||
// );
|
||||
controller.enqueue(
|
||||
Buffer.concat([
|
||||
new Uint8Array([(info.size >> 8) & 0xff, info.size & 0xff]),
|
||||
message,
|
||||
])
|
||||
);
|
||||
});
|
||||
udpClient.on('error', (error) => {
|
||||
console.log('udpClient error event', error);
|
||||
controller.error(error);
|
||||
});
|
||||
},
|
||||
|
||||
async transform(chunk: ArrayBuffer, controller) {
|
||||
//seems v2ray will use same web socket for dns query..
|
||||
//And v2ray will combine A record and AAAA record into one ws message and use 2 btye for dns query length
|
||||
for (let index = 0; index < chunk.byteLength; ) {
|
||||
const lengthBuffer = chunk.slice(index, index + 2);
|
||||
const udpPakcetLength = new DataView(lengthBuffer).getInt16(0);
|
||||
const udpData = new Uint8Array(
|
||||
chunk.slice(index + 2, index + 2 + udpPakcetLength)
|
||||
);
|
||||
index = index + 2 + udpPakcetLength;
|
||||
await new Promise((resolve, reject) => {
|
||||
udpClient.send(udpData, portRemote, address, (err) => {
|
||||
if (err) {
|
||||
console.log('udps send error', err);
|
||||
controller.error(`Failed to send UDP packet !! ${err}`);
|
||||
safeCloseUDP(udpClient);
|
||||
}
|
||||
// console.log(
|
||||
// 'udp package sent',
|
||||
// Buffer.from(udpData).toString('hex')
|
||||
// );
|
||||
resolve(true);
|
||||
});
|
||||
});
|
||||
index = index;
|
||||
}
|
||||
|
||||
// console.log('dns chunk', chunk);
|
||||
// console.log(portRemote, address);
|
||||
// port is big-Endian in raw data etc 80 == 0x005d
|
||||
},
|
||||
|
||||
flush(controller) {
|
||||
safeCloseUDP(udpClient);
|
||||
controller.terminate();
|
||||
},
|
||||
});
|
||||
return transformStream;
|
||||
}
|
||||
|
||||
function safeCloseUDP(client: UDPSocket) {
|
||||
try {
|
||||
client.close();
|
||||
} catch (error) {
|
||||
console.log('error close udp', error);
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../dist/out-tsc",
|
||||
"module": "commonjs",
|
||||
"types": ["node"]
|
||||
},
|
||||
"exclude": ["jest.config.ts", "**/*.spec.ts", "**/*.test.ts"],
|
||||
"include": ["**/*.ts"]
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.app.json"
|
||||
},
|
||||
{
|
||||
"path": "./tsconfig.spec.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../dist/out-tsc",
|
||||
"module": "commonjs",
|
||||
"types": ["jest", "node"]
|
||||
},
|
||||
"include": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"]
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
const { composePlugins, withNx } = require('@nx/webpack');
|
||||
|
||||
// Nx plugins for webpack.
|
||||
module.exports = composePlugins(withNx(), (config) => {
|
||||
// Update the webpack config as needed here.
|
||||
// e.g. config.plugins.push(new MyPlugin())
|
||||
// For more information on webpack config and Nx see:
|
||||
// https://nx.dev/packages/webpack/documents/webpack-config-setup
|
||||
return config;
|
||||
});
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"babelrcRoots": ["*"]
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
export default {
|
||||
async fetch(request, env) {
|
||||
let url = new URL(request.url);
|
||||
url.hostname = ''
|
||||
let new_request = new Request(url, request);
|
||||
console.log('-----', new_request.url)
|
||||
return fetch(new_request);
|
||||
},
|
||||
};
|
||||
@@ -1,72 +0,0 @@
|
||||
{
|
||||
"log": {
|
||||
"loglevel": "debug"
|
||||
},
|
||||
"inbounds": [
|
||||
{
|
||||
"listen": "0.0.0.0",
|
||||
"port": "4080",
|
||||
"protocol": "socks",
|
||||
"settings": {
|
||||
"auth": "noauth",
|
||||
"udp": true,
|
||||
"ip": "0.0.0.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"listen": "0.0.0.0",
|
||||
"port": "4081",
|
||||
"protocol": "http"
|
||||
}
|
||||
],
|
||||
"dns": {
|
||||
"servers": ["8.8.8.8"]
|
||||
},
|
||||
"outbounds": [
|
||||
{
|
||||
"protocol": "vless",
|
||||
"settings": {
|
||||
"vnext": [
|
||||
{
|
||||
"address": "127.0.0.1",
|
||||
"port": 8788,
|
||||
"users": [
|
||||
{
|
||||
"id": "1a403b79-039b-4dc2-9b45-1ad13197b99a",
|
||||
"encryption": "none",
|
||||
"level": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"streamSettings": {
|
||||
"network": "ws",
|
||||
"wsSettings": {
|
||||
"path": "/vless"
|
||||
}
|
||||
// "security": "tls"
|
||||
},
|
||||
"tag": "zizi-ws"
|
||||
},
|
||||
{
|
||||
"protocol": "freedom",
|
||||
"tag": "direct"
|
||||
}
|
||||
],
|
||||
"routing": {
|
||||
"domainStrategy": "IPIfNonMatch",
|
||||
"rules": [
|
||||
{
|
||||
"type": "field",
|
||||
"ip": ["8.8.8.8"],
|
||||
"outboundTag": "zizi-ws"
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"ip": ["geoip:private"],
|
||||
"outboundTag": "zizi-ws"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
{
|
||||
"log": {
|
||||
"loglevel": "debug"
|
||||
},
|
||||
"inbounds": [
|
||||
{
|
||||
"listen": "0.0.0.0",
|
||||
"port": "4080",
|
||||
"protocol": "socks",
|
||||
"settings": {
|
||||
"auth": "noauth",
|
||||
"udp": true,
|
||||
"ip": "0.0.0.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"listen": "0.0.0.0",
|
||||
"port": "4081",
|
||||
"protocol": "http"
|
||||
}
|
||||
],
|
||||
"dns": {
|
||||
"servers": ["8.8.8.8"]
|
||||
},
|
||||
"outbounds": [
|
||||
{
|
||||
"protocol": "vless",
|
||||
"settings": {
|
||||
"vnext": [
|
||||
{
|
||||
"address": "127.0.0.1",
|
||||
"port": 8787,
|
||||
"users": [
|
||||
{
|
||||
"id": "1a403b79-039b-4dc2-9b45-1ad13197b99a",
|
||||
"encryption": "none",
|
||||
"level": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"streamSettings": {
|
||||
"network": "ws"
|
||||
// "wsSettings": {
|
||||
// "path": "/node-vless"
|
||||
// }
|
||||
// "security": "tls"
|
||||
},
|
||||
"tag": "zizi-ws"
|
||||
},
|
||||
{
|
||||
"protocol": "freedom",
|
||||
"tag": "direct"
|
||||
}
|
||||
],
|
||||
"routing": {
|
||||
"domainStrategy": "IPIfNonMatch",
|
||||
"rules": [
|
||||
{
|
||||
"type": "field",
|
||||
"ip": ["8.8.8.8"],
|
||||
"outboundTag": "zizi-ws"
|
||||
},
|
||||
{
|
||||
"type": "field",
|
||||
"ip": ["geoip:private"],
|
||||
"outboundTag": "zizi-ws"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,74 +0,0 @@
|
||||
{
|
||||
"log": {
|
||||
"loglevel": "debug"
|
||||
},
|
||||
"inbounds": [
|
||||
{
|
||||
"listen": "0.0.0.0",
|
||||
"port": "4080",
|
||||
"protocol": "socks",
|
||||
"settings": {
|
||||
"auth": "noauth",
|
||||
"udp": true,
|
||||
"ip": "0.0.0.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"listen": "0.0.0.0",
|
||||
"port": "4081",
|
||||
"protocol": "http"
|
||||
}
|
||||
],
|
||||
"dns": {
|
||||
"servers": ["8.8.8.8"]
|
||||
},
|
||||
"outbounds": [
|
||||
{
|
||||
"protocol": "vless",
|
||||
"settings": {
|
||||
"vnext": [
|
||||
{
|
||||
"address": "192.203.230.111",
|
||||
"port": 80,
|
||||
"users": [
|
||||
{
|
||||
"id": "1a403b79-039b-4dc2-9b45-1ad13197b99a",
|
||||
"encryption": "none",
|
||||
"level": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"streamSettings": {
|
||||
"network": "ws",
|
||||
"wsSettings": {
|
||||
"headers": {
|
||||
"Host": "xxxxx.xxxx.xyz"
|
||||
}
|
||||
}
|
||||
// "security": "tls"
|
||||
},
|
||||
"tag": "zizi-ws"
|
||||
},
|
||||
{
|
||||
"protocol": "freedom",
|
||||
"tag": "direct"
|
||||
}
|
||||
],
|
||||
"routing": {
|
||||
"domainStrategy": "AsIs",
|
||||
"rules": [
|
||||
// {
|
||||
// "type": "field",
|
||||
// "ip": ["8.8.8.8"],
|
||||
// "outboundTag": "zizi-ws"
|
||||
// },
|
||||
{
|
||||
"type": "field",
|
||||
"ip": ["geoip:private"],
|
||||
"outboundTag": "zizi-ws"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
# Test local with DNS proxy
|
||||
@@ -1 +0,0 @@
|
||||
{"port":"8134","address":"https://cute-goose-13.deno.dev/","uuid":"james","save":true}
|
||||
0
dist/apps/node-vless/assets/.gitkeep
vendored
33
dist/apps/node-vless/assets/401.html
vendored
@@ -1,33 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>401 - UUID Not Valid</title>
|
||||
</head>
|
||||
|
||||
|
||||
<body>
|
||||
<h1 style="color: red;">Not set valid UUID in Environment Variables.</h1>
|
||||
<h2>Please use tool to generate and <span style="color: red;">remember</span> UUID or use this one <span
|
||||
style="color: blue;" id="uuidSpan"></span>
|
||||
</h2>
|
||||
<h3> You must use same UUID for login this page after config valid UUID Environment Variables
|
||||
</h3>
|
||||
<h2>Please refer to <a
|
||||
href="https://github.com/zizifn/edgetunnel/blob/main/doc/edge-tunnel-deno.md#%E6%B5%81%E7%A8%8B%E6%BC%94%E7%A4%BA">deno
|
||||
deploy guide</a>
|
||||
</h2>
|
||||
|
||||
<h3>Or maybe check below <a
|
||||
href="https://raw.githubusercontent.com/zizifn/edgetunnel/main/doc/deno-deploy2.gif">GIF</a> </h3>
|
||||
<img src="https://raw.githubusercontent.com/zizifn/edgetunnel/main/doc/deno-deploy2.gif" alt="guide" srcset="">
|
||||
<script>
|
||||
let uuid = URL.createObjectURL(new Blob([])).substr(-36);
|
||||
document.getElementById('uuidSpan').textContent = uuid
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
6374
dist/apps/node-vless/main.js
vendored
1
dist/apps/node-vless/main.js.map
vendored
|
Before Width: | Height: | Size: 262 KiB |
@@ -1,8 +0,0 @@
|
||||
|
||||
## TOS
|
||||
|
||||
https://www.cloudflare.com/supplemental-terms/
|
||||
|
||||
```
|
||||
Unlike most Cloudflare products, the Developer Platform can be used to host content. Content stored on the Developer Platform (whether in conjunction with a Cloudflare storage offering or not) that we determine in our sole judgment to be illegal, harmful, or in violation of Section 5 of the Cloudflare Developer Platforms Supplemental Terms may be blocked or removed, and use of the Developer Platform for storage of such illegal or harmful content may result in suspension or termination of Cloudflare Services. While we generally try to provide notice of such action, we reserve the right to take action without notice as appropriate. For these purposes, illegal or harmful content includes but is not limited to: (a) content containing, promoting, or facilitating child sexual abuse material or human trafficking; (b) content that infringes on another person’s intellectual property rights or is otherwise unlawful; (c) content that discloses sensitive personal information, incites or exploits violence, or is intended to defraud the public; and (d) content that seeks to distribute malware, facilitate phishing, or otherwise constitutes technical abuse.
|
||||
```
|
||||
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 2.1 MiB |
|
Before Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 1.6 MiB |
|
Before Width: | Height: | Size: 60 KiB |
@@ -1,51 +0,0 @@
|
||||
# Deno deploy Install
|
||||
|
||||
## 风险提示
|
||||
|
||||
`Deno deploy` 采用 [fair use policy](https://deno.com/deploy/docs/fair-use-policy), 翻译成中文就是`看良心使用`。 违反可能会封号。
|
||||
|
||||
## Fork 本项目到自己 Github 下
|
||||
|
||||

|
||||
|
||||
**请定期按照 github 的提示,同步 code 到自己的项目**。
|
||||

|
||||
|
||||
## 登录 Deno deploy
|
||||
|
||||
用 Github 账户登录 https://deno.com/deploy
|
||||
|
||||
> 相关免费策略,https://deno.com/deploy/pricing
|
||||
|
||||
## New Project
|
||||
|
||||
请在配置过程中 **记住 UUID**, 并且选择正确的部署入口文件。`apps\deno-vless\src\main.ts`
|
||||

|
||||
|
||||
### 流程演示
|
||||
|
||||
> GIF 仅仅是流程演示,具体入口文件,请看上图。
|
||||
|
||||
https://raw.githubusercontent.com/zizifn/edgetunnel/main/doc/deno-deploy.gif
|
||||
|
||||
如果 UUID 忘记 或者入口文件有变化,也可以在 deno 管理界面修改项目的配置。
|
||||
|
||||
https://raw.githubusercontent.com/zizifn/edgetunnel/main/doc/deno-deploy2.gif
|
||||
|
||||
其他更多配置,比如使用量,请自行探索。
|
||||
|
||||
## 项目地址
|
||||
|
||||
点击 View 项目会自动打开。一开始返回 `401`.
|
||||
|
||||
> 如果遇到 deno 生成域名不能访问的情况,请自己在 setting 里面绑定自己域名。
|
||||
>
|
||||
> 只要 deno 网站可以访问,你生成的服务就应该可以访问。
|
||||
>
|
||||
> 目前移动宽带貌似有这种问题。
|
||||
|
||||
不要慌张, 把你设置的 `UUID` 输入到弹出的用户名或者密码中。
|
||||
|
||||
然后会自动跳转到如下界面。
|
||||
|
||||

|
||||
BIN
doc/firewall.jpg
|
Before Width: | Height: | Size: 63 KiB |
BIN
doc/fork.jpg
|
Before Width: | Height: | Size: 70 KiB |
BIN
doc/index.jpg
|
Before Width: | Height: | Size: 26 KiB |
@@ -1,41 +0,0 @@
|
||||
# Render
|
||||
|
||||
## 登录 render 账户
|
||||
|
||||
## Render Web APP 每月有 100GB 出站流量限制
|
||||
|
||||
如果使用 AWS ip 注册 Render 账户,会被要求绑定信用卡才能使用 Web APP。如果出现需要绑卡提示,建议更换 ip 注册。
|
||||
|
||||
https://render.com/
|
||||
|
||||
## 访问 https://dashboard.render.com/
|
||||
|
||||
## New Project
|
||||
|
||||

|
||||
|
||||
## 关联 github 账户
|
||||
|
||||

|
||||
|
||||
## 部署新项目
|
||||
|
||||
需要填写如下信息,具体请参考下图.
|
||||
|
||||
> Render 入口为 Cloudflare cdn,如果可以优选到亚洲地区 cloudflare ip,新加坡区速度最好。否则 cloudflare 默认美国线路,选美区速度最好。
|
||||
|
||||

|
||||
|
||||
> 如果你不喜欢docker,可以直接写 npm 命令。
|
||||
>
|
||||
> | 选项 | 值 |
|
||||
> | ------------- | --------------------------------------- |
|
||||
> | Build Command | `npm install; npm run node-vless:build` |
|
||||
> | Start Command | `npm run node-vless:start` |
|
||||
|
||||
**⚠️ 添加环境变量 UUID**
|
||||

|
||||
|
||||
## 访问主页面
|
||||
|
||||
输入UUID,就可以访问服务。
|
||||
BIN
doc/render1.jpg
|
Before Width: | Height: | Size: 58 KiB |
BIN
doc/render2.jpg
|
Before Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 43 KiB |
BIN
doc/render3.jpg
|
Before Width: | Height: | Size: 207 KiB |
|
Before Width: | Height: | Size: 72 KiB |
BIN
doc/render4.jpg
|
Before Width: | Height: | Size: 136 KiB |
|
Before Width: | Height: | Size: 77 KiB |
BIN
doc/sync.jpg
|
Before Width: | Height: | Size: 33 KiB |
BIN
doc/tel.jpg
|
Before Width: | Height: | Size: 40 KiB |
BIN
doc/v2rayn.jpg
|
Before Width: | Height: | Size: 61 KiB |
@@ -1,76 +0,0 @@
|
||||
import { index401, page404 } from './util';
|
||||
import { parse, stringify, validate } from 'uuid';
|
||||
|
||||
async function errorHandling(context: EventContext<any, any, any>) {
|
||||
try {
|
||||
return await context.next();
|
||||
} catch (err) {
|
||||
return new Response(`${err.message}\n${err.stack}`, { status: 500 });
|
||||
}
|
||||
}
|
||||
|
||||
async function authentication(
|
||||
context: EventContext<
|
||||
any,
|
||||
any,
|
||||
{
|
||||
digestUUID: string;
|
||||
}
|
||||
>
|
||||
) {
|
||||
// context.data It’s an arbitrary object you can attach data to that will persist during the request. The most common use-cases are for middleware that handles auth and may need to set context.data.username or similar.
|
||||
// if not set UUID, return 401 page
|
||||
const userID = context.env['UUID'] || '';
|
||||
let isVaildUser = validate(userID);
|
||||
if (!isVaildUser) {
|
||||
return new Response(index401, {
|
||||
status: 401,
|
||||
headers: {
|
||||
'content-type': 'text/html; charset=utf-8',
|
||||
},
|
||||
});
|
||||
}
|
||||
// skip authentication
|
||||
const url = new URL(context.request.url);
|
||||
if (
|
||||
// if url has uuid, skip auth
|
||||
context.request.url.includes(userID)
|
||||
) {
|
||||
return context.next();
|
||||
}
|
||||
// static page
|
||||
const basicAuth = context.request.headers.get('Authorization') || '';
|
||||
const authString = basicAuth.split(' ')?.[1] || '';
|
||||
if (!atob(authString).includes(userID)) {
|
||||
return new Response(``, {
|
||||
status: 401,
|
||||
headers: {
|
||||
'content-type': 'text/html; charset=utf-8',
|
||||
'WWW-Authenticate': 'Basic',
|
||||
},
|
||||
});
|
||||
} else {
|
||||
const url = new URL(context.request.url);
|
||||
if (url.pathname === '/') {
|
||||
const wspath = `/vless/${userID}`;
|
||||
return new Response(``, {
|
||||
status: 302,
|
||||
headers: {
|
||||
'content-type': 'text/html; charset=utf-8',
|
||||
Location: `./${userID}?wspath=${encodeURIComponent(wspath)}`,
|
||||
},
|
||||
});
|
||||
}
|
||||
if (url.pathname.startsWith('/assets')) {
|
||||
return context.next();
|
||||
}
|
||||
return new Response(page404, {
|
||||
status: 404,
|
||||
headers: {
|
||||
'content-type': 'text/html; charset=utf-8',
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export const onRequest = [errorHandling, authentication];
|
||||
@@ -1,33 +0,0 @@
|
||||
// ignore the typescropt error
|
||||
// @ts-ignore
|
||||
import { connect } from 'cloudflare:sockets';
|
||||
|
||||
export const onRequest: PagesFunction<any> = async (context) => {
|
||||
context.params.user;
|
||||
console.log('start fetch');
|
||||
const socket = connect({
|
||||
hostname: 'neverssl.com',
|
||||
port: 80,
|
||||
});
|
||||
|
||||
const writer = socket.writable.getWriter();
|
||||
const encoder = new TextEncoder();
|
||||
const encoded = encoder.encode(
|
||||
'GET / HTTP/1.1\r\nHost: neverssl.com\r\n\r\n'
|
||||
);
|
||||
await writer.write(encoded);
|
||||
|
||||
const reader = socket.readable.getReader();
|
||||
const decoder = new TextDecoder();
|
||||
let response = '';
|
||||
while (true) {
|
||||
const res = await reader.read();
|
||||
if (res.done) {
|
||||
console.log('Stream done, socket connection has been closed.');
|
||||
break;
|
||||
}
|
||||
response += decoder.decode(res.value);
|
||||
}
|
||||
|
||||
return new Response(response);
|
||||
};
|
||||
@@ -1,9 +0,0 @@
|
||||
import { vlessJs } from 'vless-js';
|
||||
interface Env {
|
||||
KV: KVNamespace;
|
||||
}
|
||||
|
||||
export const onRequest: PagesFunction<Env> = async (context) => {
|
||||
console.log('xxxxx', context.env, vlessJs());
|
||||
return new Response(`Hello, world! ${context.request.url}--${vlessJs()}`);
|
||||
};
|
||||
@@ -1,28 +0,0 @@
|
||||
interface Env {
|
||||
KV: KVNamespace;
|
||||
}
|
||||
|
||||
export const onRequest: PagesFunction<Env> = async (context) => {
|
||||
let count = 0;
|
||||
console.log('test11', Date.now());
|
||||
await new Promise((resolve, rej) => {
|
||||
setTimeout(() => {
|
||||
resolve('');
|
||||
}, 100);
|
||||
});
|
||||
console.log('test11', Date.now());
|
||||
const transformStream =
|
||||
context.request.body?.pipeThrough(new TextDecoderStream()).pipeThrough(
|
||||
new TransformStream({
|
||||
transform(chunk, controller) {
|
||||
console.log('test', Date.now());
|
||||
controller.enqueue(
|
||||
new TextEncoder().encode(`${chunk} + ${count++} ${new Date()}`)
|
||||
);
|
||||
},
|
||||
})
|
||||
) || 'default';
|
||||
return new Response(transformStream, {
|
||||
headers: { 'content-type': 'text/plain' },
|
||||
});
|
||||
};
|
||||
@@ -1,25 +0,0 @@
|
||||
interface Env {
|
||||
KV: KVNamespace;
|
||||
}
|
||||
|
||||
export const onRequest: PagesFunction<Env> = async ({ request, data }) => {
|
||||
console.log(data);
|
||||
const upgradeHeader = request.headers.get('Upgrade');
|
||||
if (!upgradeHeader || upgradeHeader !== 'websocket') {
|
||||
return new Response('Expected Upgrade: websocket', { status: 426 });
|
||||
}
|
||||
|
||||
const webSocketPair = new WebSocketPair();
|
||||
const [client, server] = Object.values(webSocketPair);
|
||||
|
||||
server.accept();
|
||||
server.addEventListener('message', (event) => {
|
||||
console.log(event.data);
|
||||
server.send(`server reponse after client sent ${event.data}`);
|
||||
});
|
||||
server.send(`client sned`);
|
||||
return new Response(null, {
|
||||
status: 101,
|
||||
webSocket: client,
|
||||
});
|
||||
};
|
||||
@@ -1 +0,0 @@
|
||||
for local env, create `.dev.vars` env file
|
||||
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "esnext",
|
||||
"module": "esnext",
|
||||
"lib": ["esnext"],
|
||||
"types": ["@cloudflare/workers-types"],
|
||||
"paths": {
|
||||
"vless-js": ["../libs/vless-js/src/index.ts"]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
const index401 = `
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>401 - UUID Not Valid</title>
|
||||
</head>
|
||||
|
||||
|
||||
<body>
|
||||
<h1 style="color: red;">Not set valid UUID in Environment Variables.</h1>
|
||||
<h2>Please use tool to generate and <span style="color: red;">remember</span> UUID or use this one <span
|
||||
style="color: blue;" id="uuidSpan"></span>
|
||||
</h2>
|
||||
<h3> You must use same UUID for login this page after config valid UUID Environment Variables
|
||||
</h3>
|
||||
<h2>
|
||||
Please refer to
|
||||
<a
|
||||
href="https://edgetunnel.114567.xyz/guide/cf-pages.html#%E5%A1%AB%E5%86%99-pages-build-%E4%BF%A1%E6%81%AF"
|
||||
>Cloudflare pages deploy guide</a
|
||||
>
|
||||
</h2>
|
||||
<script>
|
||||
let uuid = URL.createObjectURL(new Blob([])).substr(-36);
|
||||
document.getElementById('uuidSpan').textContent = uuid
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>`;
|
||||
|
||||
const page404 = `
|
||||
<html>
|
||||
<head><title>404 Not Found</title></head>
|
||||
<body>
|
||||
<center><h1>404 Not Found</h1></center>
|
||||
<hr><center>nginx/1.23.4</center>
|
||||
</body>
|
||||
</html>
|
||||
`;
|
||||
|
||||
async function digestMessage(message: string) {
|
||||
const msgUint8 = new TextEncoder().encode(message); // encode as (utf-8) Uint8Array
|
||||
const hashBuffer = await crypto.subtle.digest('SHA-256', msgUint8); // hash the message
|
||||
const hashArray = Array.from(new Uint8Array(hashBuffer)); // convert buffer to byte array
|
||||
const hashHex = hashArray
|
||||
.map((b) => b.toString(16).padStart(2, '0'))
|
||||
.join(''); // convert bytes to hex string
|
||||
return hashHex;
|
||||
}
|
||||
|
||||
export { index401, page404, digestMessage };
|
||||
@@ -1,192 +0,0 @@
|
||||
import {
|
||||
makeReadableWebSocketStream,
|
||||
processVlessHeader,
|
||||
vlessJs,
|
||||
} from 'vless-js';
|
||||
import { connect } from 'cloudflare:sockets';
|
||||
import { page404 } from '../util';
|
||||
|
||||
interface Env {
|
||||
KV: KVNamespace;
|
||||
UUID: string;
|
||||
}
|
||||
|
||||
export const onRequest: PagesFunction<Env> = async (context) => {
|
||||
const userID = context.env['UUID'];
|
||||
if (context.params.wspath !== userID) {
|
||||
return new Response(``, {
|
||||
status: 401,
|
||||
headers: {
|
||||
'content-type': 'text/html; charset=utf-8',
|
||||
'WWW-Authenticate': 'Basic',
|
||||
},
|
||||
});
|
||||
}
|
||||
console.log(context.params.wspath);
|
||||
let address = '';
|
||||
let portWithRandomLog = '';
|
||||
|
||||
const log = (info: string, event?: any) => {
|
||||
console.log(`[${address}:${portWithRandomLog}] ${info}`, event || '');
|
||||
};
|
||||
|
||||
const upgradeHeader = context.request.headers.get('Upgrade');
|
||||
// index page
|
||||
if (!upgradeHeader || upgradeHeader !== 'websocket') {
|
||||
return new Response(`need Upgrade to ws`, {
|
||||
status: 200,
|
||||
headers: {
|
||||
'content-type': 'text/html; charset=utf-8',
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
const webSocketPair = new WebSocketPair();
|
||||
const [client, webSocket] = Object.values(webSocketPair);
|
||||
|
||||
const earlyDataHeader =
|
||||
context.request.headers.get('sec-websocket-protocol') || '';
|
||||
let remoteSocket: TransformStream = null;
|
||||
webSocket.accept();
|
||||
|
||||
const readableWebSocketStream = makeReadableWebSocketStream(
|
||||
webSocket,
|
||||
earlyDataHeader,
|
||||
log
|
||||
);
|
||||
let vlessResponseHeader = new Uint8Array([0, 0]);
|
||||
let remoteConnectionReadyResolve: Function;
|
||||
|
||||
// ws-->remote
|
||||
|
||||
readableWebSocketStream.pipeTo(
|
||||
new WritableStream({
|
||||
async write(chunk, controller) {
|
||||
if (remoteSocket) {
|
||||
const writer = remoteSocket.writable.getWriter();
|
||||
await writer.write(chunk);
|
||||
writer.releaseLock();
|
||||
return;
|
||||
}
|
||||
|
||||
const {
|
||||
hasError,
|
||||
message,
|
||||
portRemote,
|
||||
addressRemote,
|
||||
rawDataIndex,
|
||||
vlessVersion,
|
||||
isUDP,
|
||||
} = processVlessHeader(chunk, userID);
|
||||
address = addressRemote || '';
|
||||
portWithRandomLog = `${portRemote}--${Math.random()} ${
|
||||
isUDP ? 'udp ' : 'tcp '
|
||||
} `;
|
||||
// if UDP but port not DNS port, close it
|
||||
if (isUDP && portRemote != 53) {
|
||||
controller.error('UDP proxy only enable for DNS which is port 53');
|
||||
webSocket.close(); // server close will not casuse worker throw error
|
||||
return;
|
||||
}
|
||||
if (hasError) {
|
||||
controller.error(message);
|
||||
webSocket.close(); // server close will not casuse worker throw error
|
||||
return;
|
||||
}
|
||||
vlessResponseHeader = new Uint8Array([vlessVersion![0], 0]);
|
||||
const rawClientData = chunk.slice(rawDataIndex!);
|
||||
remoteSocket = connect({
|
||||
hostname: addressRemote,
|
||||
port: portRemote,
|
||||
});
|
||||
log(`connected`);
|
||||
|
||||
const writer = remoteSocket.writable.getWriter();
|
||||
await writer.write(rawClientData); // first write, nomal is tls client hello
|
||||
writer.releaseLock();
|
||||
|
||||
// remoteSocket ready
|
||||
remoteConnectionReadyResolve(remoteSocket);
|
||||
},
|
||||
close() {
|
||||
console.log(
|
||||
`[${address}:${portWithRandomLog}] readableWebSocketStream is close`
|
||||
);
|
||||
},
|
||||
abort(reason) {
|
||||
console.log(
|
||||
`[${address}:${portWithRandomLog}] readableWebSocketStream is abort`,
|
||||
JSON.stringify(reason)
|
||||
);
|
||||
},
|
||||
})
|
||||
);
|
||||
|
||||
(async () => {
|
||||
await new Promise((resolve) => (remoteConnectionReadyResolve = resolve));
|
||||
|
||||
// remote--> ws
|
||||
let count = 0;
|
||||
remoteSocket.readable
|
||||
.pipeTo(
|
||||
new WritableStream({
|
||||
start() {
|
||||
if (webSocket.readyState === WebSocket.READY_STATE_OPEN) {
|
||||
webSocket.send(vlessResponseHeader!);
|
||||
}
|
||||
},
|
||||
async write(chunk: Uint8Array, controller) {
|
||||
if (webSocket.readyState === WebSocket.READY_STATE_OPEN) {
|
||||
if (count++ > 20000) {
|
||||
// cf one package is 4096 byte(4kb), 4096 * 20000 = 80M
|
||||
await delay(1);
|
||||
}
|
||||
webSocket.send(chunk);
|
||||
// console.log(chunk.byteLength);
|
||||
} else {
|
||||
controller.error('webSocket.readyState is not open, maybe close');
|
||||
}
|
||||
},
|
||||
close() {
|
||||
console.log(
|
||||
`[${address}:${portWithRandomLog}] remoteConnection!.readable is close`
|
||||
);
|
||||
},
|
||||
abort(reason) {
|
||||
console.error(
|
||||
`[${address}:${portWithRandomLog}] remoteConnection!.readable abort`,
|
||||
reason
|
||||
);
|
||||
},
|
||||
})
|
||||
)
|
||||
.catch((error) => {
|
||||
console.error(
|
||||
`[${address}:${portWithRandomLog}] processWebSocket has exception `,
|
||||
error.stack || error
|
||||
);
|
||||
safeCloseWebSocket(webSocket);
|
||||
});
|
||||
})();
|
||||
|
||||
return new Response(null, {
|
||||
status: 101,
|
||||
webSocket: client,
|
||||
});
|
||||
};
|
||||
|
||||
function safeCloseWebSocket(ws: WebSocket) {
|
||||
try {
|
||||
if (ws.readyState !== WebSocket.READY_STATE_CLOSED) {
|
||||
ws.close();
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('safeCloseWebSocket error', error);
|
||||
}
|
||||
}
|
||||
|
||||
function delay(ms) {
|
||||
return new Promise((resolve, rej) => {
|
||||
setTimeout(resolve, ms);
|
||||
});
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"imports": {
|
||||
"vless-js": "./libs/vless-js/src/lib/vless-js.ts",
|
||||
"uuid": "https://jspm.dev/uuid",
|
||||
"lodash": "https://jspm.dev/lodash-es"
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
import { getJestProjects } from '@nx/jest';
|
||||
|
||||
export default {
|
||||
projects: getJestProjects(),
|
||||
};
|
||||
@@ -1,15 +0,0 @@
|
||||
const nxPreset = require('@nx/jest/preset').default;
|
||||
|
||||
module.exports = {
|
||||
...nxPreset,
|
||||
/* TODO: Update to latest Jest snapshotFormat
|
||||
* By default Nx has kept the older style of Jest Snapshot formats
|
||||
* to prevent breaking of any existing tests with snapshots.
|
||||
* It's recommend you update to the latest format.
|
||||
* You can do this by removing snapshotFormat property
|
||||
* and running tests with --update-snapshot flag.
|
||||
* Example: "nx affected --targets=test --update-snapshot"
|
||||
* More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
|
||||
*/
|
||||
snapshotFormat: { escapeString: true, printBasicPrototype: true },
|
||||
};
|
||||
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"extends": ["../../.eslintrc.json"],
|
||||
"ignorePatterns": ["!**/*"],
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
"files": ["*.ts", "*.tsx"],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
"files": ["*.js", "*.jsx"],
|
||||
"rules": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
# cf-worker-vless
|
||||
|
||||
This library was generated with [Nx](https://nx.dev).
|
||||
|
||||
## Building
|
||||
|
||||
Run `nx build cf-worker-vless` to build the library.
|
||||
|
||||
## Running unit tests
|
||||
|
||||
Run `nx test cf-worker-vless` to execute the unit tests via [Jest](https://jestjs.io).
|
||||
@@ -1,351 +0,0 @@
|
||||
// node_modules/uuid/dist/esm-browser/regex.js
|
||||
var regex_default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
|
||||
|
||||
// node_modules/uuid/dist/esm-browser/validate.js
|
||||
function validate(uuid) {
|
||||
return typeof uuid === "string" && regex_default.test(uuid);
|
||||
}
|
||||
var validate_default = validate;
|
||||
|
||||
// node_modules/uuid/dist/esm-browser/stringify.js
|
||||
var byteToHex = [];
|
||||
for (let i = 0; i < 256; ++i) {
|
||||
byteToHex.push((i + 256).toString(16).slice(1));
|
||||
}
|
||||
function unsafeStringify(arr, offset = 0) {
|
||||
return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
|
||||
}
|
||||
function stringify(arr, offset = 0) {
|
||||
const uuid = unsafeStringify(arr, offset);
|
||||
if (!validate_default(uuid)) {
|
||||
throw TypeError("Stringified UUID is invalid");
|
||||
}
|
||||
return uuid;
|
||||
}
|
||||
var stringify_default = stringify;
|
||||
|
||||
// libs/vless-js/src/lib/vless-js.ts
|
||||
var WS_READY_STATE_OPEN = 1;
|
||||
function makeReadableWebSocketStream(ws, earlyDataHeader, log) {
|
||||
let readableStreamCancel = false;
|
||||
return new ReadableStream({
|
||||
start(controller) {
|
||||
ws.addEventListener("message", async (e) => {
|
||||
if (readableStreamCancel) {
|
||||
return;
|
||||
}
|
||||
const vlessBuffer = e.data;
|
||||
controller.enqueue(vlessBuffer);
|
||||
});
|
||||
ws.addEventListener("error", (e) => {
|
||||
log("socket has error");
|
||||
readableStreamCancel = true;
|
||||
controller.error(e);
|
||||
});
|
||||
ws.addEventListener("close", () => {
|
||||
try {
|
||||
log("webSocket is close");
|
||||
if (readableStreamCancel) {
|
||||
return;
|
||||
}
|
||||
controller.close();
|
||||
} catch (error2) {
|
||||
log(`websocketStream can't close DUE to `, error2);
|
||||
}
|
||||
});
|
||||
const { earlyData, error } = base64ToArrayBuffer(earlyDataHeader);
|
||||
if (error) {
|
||||
log(`earlyDataHeader has invaild base64`);
|
||||
safeCloseWebSocket(ws);
|
||||
return;
|
||||
}
|
||||
if (earlyData) {
|
||||
controller.enqueue(earlyData);
|
||||
}
|
||||
},
|
||||
pull(controller) {
|
||||
},
|
||||
cancel(reason) {
|
||||
log(`websocketStream is cancel DUE to `, reason);
|
||||
if (readableStreamCancel) {
|
||||
return;
|
||||
}
|
||||
readableStreamCancel = true;
|
||||
safeCloseWebSocket(ws);
|
||||
}
|
||||
});
|
||||
}
|
||||
function base64ToArrayBuffer(base64Str) {
|
||||
if (!base64Str) {
|
||||
return { error: null };
|
||||
}
|
||||
try {
|
||||
base64Str = base64Str.replace(/-/g, "+").replace(/_/g, "/");
|
||||
const decode = atob(base64Str);
|
||||
const arryBuffer = Uint8Array.from(decode, (c) => c.charCodeAt(0));
|
||||
return { earlyData: arryBuffer.buffer, error: null };
|
||||
} catch (error) {
|
||||
return { error };
|
||||
}
|
||||
}
|
||||
function safeCloseWebSocket(socket) {
|
||||
try {
|
||||
if (socket.readyState === WS_READY_STATE_OPEN) {
|
||||
socket.close();
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("safeCloseWebSocket error", error);
|
||||
}
|
||||
}
|
||||
function processVlessHeader(vlessBuffer, userID) {
|
||||
if (vlessBuffer.byteLength < 24) {
|
||||
return {
|
||||
hasError: true,
|
||||
message: "invalid data"
|
||||
};
|
||||
}
|
||||
const version = new Uint8Array(vlessBuffer.slice(0, 1));
|
||||
let isValidUser = false;
|
||||
let isUDP = false;
|
||||
if (stringify_default(new Uint8Array(vlessBuffer.slice(1, 17))) === userID) {
|
||||
isValidUser = true;
|
||||
}
|
||||
if (!isValidUser) {
|
||||
return {
|
||||
hasError: true,
|
||||
message: "invalid user"
|
||||
};
|
||||
}
|
||||
const optLength = new Uint8Array(vlessBuffer.slice(17, 18))[0];
|
||||
const command = new Uint8Array(
|
||||
vlessBuffer.slice(18 + optLength, 18 + optLength + 1)
|
||||
)[0];
|
||||
if (command === 1) {
|
||||
} else if (command === 2) {
|
||||
isUDP = true;
|
||||
} else {
|
||||
return {
|
||||
hasError: true,
|
||||
message: `command ${command} is not support, command 01-tcp,02-udp,03-mux`
|
||||
};
|
||||
}
|
||||
const portIndex = 18 + optLength + 1;
|
||||
const portBuffer = vlessBuffer.slice(portIndex, portIndex + 2);
|
||||
const portRemote = new DataView(portBuffer).getInt16(0);
|
||||
let addressIndex = portIndex + 2;
|
||||
const addressBuffer = new Uint8Array(
|
||||
vlessBuffer.slice(addressIndex, addressIndex + 1)
|
||||
);
|
||||
const addressType = addressBuffer[0];
|
||||
let addressLength = 0;
|
||||
let addressValueIndex = addressIndex + 1;
|
||||
let addressValue = "";
|
||||
switch (addressType) {
|
||||
case 1:
|
||||
addressLength = 4;
|
||||
addressValue = new Uint8Array(
|
||||
vlessBuffer.slice(addressValueIndex, addressValueIndex + addressLength)
|
||||
).join(".");
|
||||
break;
|
||||
case 2:
|
||||
addressLength = new Uint8Array(
|
||||
vlessBuffer.slice(addressValueIndex, addressValueIndex + 1)
|
||||
)[0];
|
||||
addressValueIndex += 1;
|
||||
addressValue = new TextDecoder().decode(
|
||||
vlessBuffer.slice(addressValueIndex, addressValueIndex + addressLength)
|
||||
);
|
||||
break;
|
||||
case 3:
|
||||
addressLength = 16;
|
||||
const dataView = new DataView(
|
||||
vlessBuffer.slice(addressValueIndex, addressValueIndex + addressLength)
|
||||
);
|
||||
const ipv6 = [];
|
||||
for (let i = 0; i < 8; i++) {
|
||||
ipv6.push(dataView.getUint16(i * 2).toString(16));
|
||||
}
|
||||
addressValue = ipv6.join(":");
|
||||
break;
|
||||
default:
|
||||
console.log(`invild addressType is ${addressType}`);
|
||||
}
|
||||
if (!addressValue) {
|
||||
return {
|
||||
hasError: true,
|
||||
message: `addressValue is empty, addressType is ${addressType}`
|
||||
};
|
||||
}
|
||||
return {
|
||||
hasError: false,
|
||||
addressRemote: addressValue,
|
||||
portRemote,
|
||||
rawDataIndex: addressValueIndex + addressLength,
|
||||
vlessVersion: version,
|
||||
isUDP
|
||||
};
|
||||
}
|
||||
|
||||
// libs/cf-worker-vless/src/cf-worker-vless.ts
|
||||
import { connect } from "cloudflare:sockets";
|
||||
function delay2(ms) {
|
||||
return new Promise((resolve, rej) => {
|
||||
setTimeout(resolve, ms);
|
||||
});
|
||||
}
|
||||
var cf_worker_vless_default = {
|
||||
async fetch(request, env, ctx) {
|
||||
let address = "";
|
||||
let portWithRandomLog = "";
|
||||
const userID = env.UUID || "7f14e42a-f453-4c39-a762-019ee493237d";
|
||||
const isVaildUUID = validate_default(userID);
|
||||
const log = (info, event) => {
|
||||
console.log(`[${address}:${portWithRandomLog}] ${info}`, event || "");
|
||||
};
|
||||
const upgradeHeader = request.headers.get("Upgrade");
|
||||
if (!upgradeHeader || upgradeHeader !== "websocket") {
|
||||
return new Response(
|
||||
`<html>
|
||||
<head><title>404 Not Found</title></head>
|
||||
<body>
|
||||
<center><h1>404 Not Found ${isVaildUUID ? "_-_" : ""}</h1></center>
|
||||
<hr><center>nginx/1.23.4</center>
|
||||
</body>
|
||||
</html>`,
|
||||
{
|
||||
status: 404,
|
||||
headers: {
|
||||
"content-type": "text/html; charset=utf-8",
|
||||
"WWW-Authenticate": "Basic"
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
const webSocketPair = new WebSocketPair();
|
||||
const [client, webSocket] = Object.values(webSocketPair);
|
||||
const earlyDataHeader = request.headers.get("sec-websocket-protocol") || "";
|
||||
let remoteSocket = null;
|
||||
webSocket.accept();
|
||||
const readableWebSocketStream = makeReadableWebSocketStream(
|
||||
webSocket,
|
||||
earlyDataHeader,
|
||||
log
|
||||
);
|
||||
let vlessResponseHeader = new Uint8Array([0, 0]);
|
||||
let remoteConnectionReadyResolve;
|
||||
readableWebSocketStream.pipeTo(
|
||||
new WritableStream({
|
||||
async write(chunk, controller) {
|
||||
if (remoteSocket) {
|
||||
const writer2 = remoteSocket.writable.getWriter();
|
||||
await writer2.write(chunk);
|
||||
writer2.releaseLock();
|
||||
return;
|
||||
}
|
||||
const {
|
||||
hasError,
|
||||
message,
|
||||
portRemote,
|
||||
addressRemote,
|
||||
rawDataIndex,
|
||||
vlessVersion,
|
||||
isUDP
|
||||
} = processVlessHeader(chunk, userID);
|
||||
address = addressRemote || "";
|
||||
portWithRandomLog = `${portRemote}--${Math.random()} ${isUDP ? "udp " : "tcp "} `;
|
||||
if (isUDP && portRemote != 53) {
|
||||
controller.error("UDP proxy only enable for DNS which is port 53");
|
||||
webSocket.close();
|
||||
return;
|
||||
}
|
||||
if (hasError) {
|
||||
controller.error(message);
|
||||
webSocket.close();
|
||||
return;
|
||||
}
|
||||
vlessResponseHeader = new Uint8Array([vlessVersion[0], 0]);
|
||||
const rawClientData = chunk.slice(rawDataIndex);
|
||||
remoteSocket = connect({
|
||||
hostname: addressRemote,
|
||||
port: portRemote
|
||||
});
|
||||
log(`connected`);
|
||||
const writer = remoteSocket.writable.getWriter();
|
||||
await writer.write(rawClientData);
|
||||
writer.releaseLock();
|
||||
remoteConnectionReadyResolve(remoteSocket);
|
||||
},
|
||||
close() {
|
||||
console.log(
|
||||
`[${address}:${portWithRandomLog}] readableWebSocketStream is close`
|
||||
);
|
||||
},
|
||||
abort(reason) {
|
||||
console.log(
|
||||
`[${address}:${portWithRandomLog}] readableWebSocketStream is abort`,
|
||||
JSON.stringify(reason)
|
||||
);
|
||||
}
|
||||
})
|
||||
);
|
||||
(async () => {
|
||||
await new Promise((resolve) => remoteConnectionReadyResolve = resolve);
|
||||
let count = 0;
|
||||
remoteSocket.readable.pipeTo(
|
||||
new WritableStream({
|
||||
start() {
|
||||
if (webSocket.readyState === WebSocket.READY_STATE_OPEN) {
|
||||
webSocket.send(vlessResponseHeader);
|
||||
}
|
||||
},
|
||||
async write(chunk, controller) {
|
||||
if (webSocket.readyState === WebSocket.READY_STATE_OPEN) {
|
||||
if (count++ > 2e4) {
|
||||
await delay2(1);
|
||||
}
|
||||
webSocket.send(chunk);
|
||||
} else {
|
||||
controller.error(
|
||||
"webSocket.readyState is not open, maybe close"
|
||||
);
|
||||
}
|
||||
},
|
||||
close() {
|
||||
console.log(
|
||||
`[${address}:${portWithRandomLog}] remoteConnection!.readable is close`
|
||||
);
|
||||
},
|
||||
abort(reason) {
|
||||
console.error(
|
||||
`[${address}:${portWithRandomLog}] remoteConnection!.readable abort`,
|
||||
reason
|
||||
);
|
||||
}
|
||||
})
|
||||
).catch((error) => {
|
||||
console.error(
|
||||
`[${address}:${portWithRandomLog}] processWebSocket has exception `,
|
||||
error.stack || error
|
||||
);
|
||||
safeCloseWebSocket2(webSocket);
|
||||
});
|
||||
})();
|
||||
return new Response(null, {
|
||||
status: 101,
|
||||
webSocket: client
|
||||
});
|
||||
}
|
||||
};
|
||||
function safeCloseWebSocket2(ws) {
|
||||
try {
|
||||
if (ws.readyState !== WebSocket.READY_STATE_CLOSED) {
|
||||
ws.close();
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("safeCloseWebSocket error", error);
|
||||
}
|
||||
}
|
||||
export {
|
||||
cf_worker_vless_default as default
|
||||
};
|
||||
//# sourceMappingURL=cf-worker-vless.js.map
|
||||
@@ -1,10 +0,0 @@
|
||||
/* eslint-disable */
|
||||
export default {
|
||||
displayName: 'cf-worker-vless',
|
||||
preset: '../../jest.preset.js',
|
||||
transform: {
|
||||
'^.+\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
|
||||
},
|
||||
moduleFileExtensions: ['ts', 'js', 'html'],
|
||||
coverageDirectory: '../../coverage/libs/cf-worker-vless',
|
||||
};
|
||||