forked from Jigsaw-Code/outline-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 7bbd366
Showing
69 changed files
with
22,348 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.DS_Store | ||
server | ||
test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
scp ./install.sh root@$1:/root | ||
scp ./pubkey root@$1:/root | ||
ssh -t root@$1 'apt-get update && apt-get install -y docker.io' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
const fs = require("fs"); | ||
const crypto = require("crypto"); | ||
const keys = { | ||
public: `-----BEGIN PUBLIC KEY----- | ||
MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAqSD7ftUrjGxbp6glYvSh | ||
Gfos3LTYgy3PeRtw6TDAJxTkIEduprNHQf5guVb+HMiLeJcdjc4GvIbusv7XEEXp | ||
aVe+yXvfLQjlBzHBu0XqTHUBSpAbUwrSxgoRWxmJIcFn5/SOa0j6GcVNPYpTZbc/ | ||
2giq32pwY/O9mAjW3HQu2uzV3s2PwBiD3P2qygyr2pUZRQibKHNQk+Rmj5YBJ9Um | ||
kKLwgYn55Wr8ktA40mxz2M15MtAjO0vv6JvsLhnOOEH7KJQyo+sdl2qMsDmsBvdW | ||
R8iRoz6N7w9Q6OovP+pFLXfockL9GJYD341HRl8IMPMAKykUyjFwfD3trMqlH/Cx | ||
Y7kAZT4cRZa7/4jnRIbMXqOyrkLHIy2laHSTk77LdSfJHf7yqVijoCa5yhKbMU1g | ||
pOcM4gtsnIyU94qZqd6nRxTyozHDNdEMswBPmYLnvjyRZ7jD0fXWBFLEEZGCttl2 | ||
zztyGC0o76QgJyfOx8equc1li0NTXJxl1RzVw6GyAYHP7sEoNBWjWwwSxKDUTSZ+ | ||
1pfcmdS5oh9rESPWV9onDzqXLEvWgc6knS2ChIZe71r/1XYnaaX8ZkMzi4w7nXWO | ||
VSS7y/OttWNiEdufFm0XGq9p9CtcNf7RGbvTDEiq/Ma0q3DXXsnuFfsw0186sO08 | ||
iR/ER66ziRvIocwb7jh0TFMCAwEAAQ== | ||
-----END PUBLIC KEY-----`, | ||
private: `-----BEGIN PRIVATE KEY----- | ||
MIIJQwIBADANBgkqhkiG9w0BAQEFAASCCS0wggkpAgEAAoICAQCpIPt+1SuMbFun | ||
qCVi9KEZ+izctNiDLc95G3DpMMAnFOQgR26ms0dB/mC5Vv4cyIt4lx2Nzga8hu6y | ||
/tcQRelpV77Je98tCOUHMcG7RepMdQFKkBtTCtLGChFbGYkhwWfn9I5rSPoZxU09 | ||
ilNltz/aCKrfanBj872YCNbcdC7a7NXezY/AGIPc/arKDKvalRlFCJsoc1CT5GaP | ||
lgEn1SaQovCBifnlavyS0DjSbHPYzXky0CM7S+/om+wuGc44QfsolDKj6x2Xaoyw | ||
OawG91ZHyJGjPo3vD1Do6i8/6kUtd+hyQv0YlgPfjUdGXwgw8wArKRTKMXB8Pe2s | ||
yqUf8LFjuQBlPhxFlrv/iOdEhsxeo7KuQscjLaVodJOTvst1J8kd/vKpWKOgJrnK | ||
EpsxTWCk5wziC2ycjJT3ipmp3qdHFPKjMcM10QyzAE+Zgue+PJFnuMPR9dYEUsQR | ||
kYK22XbPO3IYLSjvpCAnJ87Hx6q5zWWLQ1NcnGXVHNXDobIBgc/uwSg0FaNbDBLE | ||
oNR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ITityQ63ABPnC6tm4QECa49h+I5 | ||
P8mq5LnfVzyRPtkDnT/ToqJWULMISHu43E+Nw11Yox9pWdFhzeA5SntF/+qzFuCz | ||
SEemA3J8g3PpcMb9NvmoTw6HchZVN9oE7hnIMOiS4r4UHCGhydtgThq2BBjB/zRg | ||
FHDIhncrH+Vtg/KcFTYs0XFztPzSKkSytDbQC6UXC8ztOrw3o6dO2v3rJVm+IMfd | ||
P/WhAoIBADfMtF7gRfIpmZWh8EMxQK+z7a2M7SJxoPrjSzT57TDuEIZAlcANAPjf | ||
PcylcpT3ywRTaWjhu/FwHrtGIqflKb0ZFPFo+dTGZj+VpN1iFfc+3Kf+iZYORLH0 | ||
ZGBEWM7xKqyUS4DotB/8gLHrRizpvQBHN1fKp4U1GlOu6NyJC5aRch211/q0nAEI | ||
P/c25yxWMg1+JbSOS9X8Un6Ql7i5JGOaT+6yu34ANK1rReH0NuQduxPJcojGE4DN | ||
qJZ4+BZK2sfJyltY9z8V0ithux8LPXe4N0BlAZNCRU0EODI5VQ/mOaC4KIakQmPl | ||
nn5EDmZPeY1gDZQd9OYaOAawMtpdD8U= | ||
-----END PRIVATE KEY-----`, | ||
}; | ||
|
||
const string = crypto | ||
.publicEncrypt( | ||
keys.public, | ||
Buffer.from( | ||
JSON.stringify({ | ||
api: "https://64.180.114.39:22272/OLWEgrCtWbJRQb6Z0NyMdA", | ||
ip: "64.180.114.39", | ||
port: "7891", | ||
name: "Mini 64.180.114.39", | ||
cert: JSON.parse(fs.readFileSync("/root/test/test/")), | ||
}), | ||
"utf-8" | ||
) | ||
) | ||
.toString("base64"); | ||
|
||
console.log(string); | ||
console.log( | ||
JSON.stringify({ | ||
api: "https://64.180.114.39:22272/OLWEgrCtWbJRQb6Z0NyMdA", | ||
ip: "64.180.114.39", | ||
port: "7891", | ||
name: "Mini 64.180.114.39", | ||
}) | ||
); | ||
console.log( | ||
crypto | ||
.privateDecrypt( | ||
keys.private, | ||
Buffer.from( | ||
"XvUXRanhgtXEzw4OpABijBfoSMRDKpHXrpsToa1YbpB5Xm6bDpIW2fxkq9N1omIVQNX6Cut30lEJhos4LC2k5pjkFoSsgf8NwRoM1cm1hhd795AVkcSOpLbVaBbamggaLhrecN5n0bBB9A3ClMA48X4hZljCpHfLb+ikBVu+ForG6iiK/EXg7i6watxzvMTidIAhvzpMWBhjqORP7AVbwJ44MQBvpTr2fEsgTUt0EsZcGwjlxWqyk1n7i79NoOcnGZlhyY3iU9Zn0Zj7lMqJgmQH0rmidBiFSYTlKqE9IGsH6+KWc+EKc2eS28czazuVo2vkmtmX1/Bah1watSzX7+sjJKVgAZYIWo+4ely0RpyaS3J1Qu53ZqdoOzf46x7KPoO6FgD1gIfCZeCV6O03iei/S2Rj5nzfpuueohSslSWXg4v0z9JnQnjIyIuu7xdBjFWFY6JzoeO2dyALDmW9kz9GzaKnAEAUY6d/cwRgBOtTw3vczo6fxeqlcfgmUA2k42s5OOhLhJ7Np4SLo309DdP3q6dhZSUXLDLaqiFoi65pIWIvL1t2uH7kYQ93N87VTyl8UWGXCJmRd141A6HZO9EQqwCmb/JQiZ2H3Q+MvdKSVeLNqybRi0ZSQcfJsR1bv48cFJV8SYirjXb91wkrmu9XvJqqaBIfRYOLjBj/Vpk=", | ||
"base64" | ||
) | ||
) | ||
.toString() | ||
); |
Oops, something went wrong.