From a1abcaa6c8cab10f2416553140bc35d48b7f90bd Mon Sep 17 00:00:00 2001 From: moloch-- <875022+moloch--@users.noreply.github.com> Date: Wed, 13 Dec 2023 17:04:22 -0600 Subject: [PATCH] Add nextjs docs app --- .github/workflows/docs.yml | 87 + docs/404.html | 24 - docs/Gemfile | 41 - docs/Gemfile.lock | 274 -- docs/_config.yml | 51 - docs/_layouts/default.html | 39 - docs/_layouts/post.html | 14 - docs/_posts/2021-07-07-getting-started.md | 254 -- docs/about.md | 18 - docs/index.html | 11 - docs/sliver-docs/.eslintrc.json | 3 + docs/sliver-docs/.gitignore | 36 + docs/sliver-docs/README.md | 40 + docs/sliver-docs/next.config.js | 10 + docs/sliver-docs/package-lock.json | 4385 +++++++++++++++++++++ docs/sliver-docs/package.json | 27 + docs/sliver-docs/pages/_app.tsx | 6 + docs/sliver-docs/pages/_document.tsx | 13 + docs/sliver-docs/pages/api/hello.ts | 13 + docs/sliver-docs/pages/index.tsx | 118 + docs/sliver-docs/postcss.config.js | 6 + docs/sliver-docs/public/.nojekyll | 0 docs/sliver-docs/public/favicon.ico | Bin 0 -> 25931 bytes docs/sliver-docs/public/install | 191 + docs/sliver-docs/public/next.svg | 1 + docs/sliver-docs/public/vercel.svg | 1 + docs/sliver-docs/styles/globals.css | 27 + docs/sliver-docs/tailwind.config.ts | 20 + docs/sliver-docs/tsconfig.json | 22 + docs/sliver.service | 14 - 30 files changed, 5006 insertions(+), 740 deletions(-) create mode 100644 .github/workflows/docs.yml delete mode 100644 docs/404.html delete mode 100644 docs/Gemfile delete mode 100644 docs/Gemfile.lock delete mode 100644 docs/_config.yml delete mode 100644 docs/_layouts/default.html delete mode 100644 docs/_layouts/post.html delete mode 100644 docs/_posts/2021-07-07-getting-started.md delete mode 100644 docs/about.md delete mode 100644 docs/index.html create mode 100644 docs/sliver-docs/.eslintrc.json create mode 100644 docs/sliver-docs/.gitignore create mode 100644 docs/sliver-docs/README.md create mode 100644 docs/sliver-docs/next.config.js create mode 100644 docs/sliver-docs/package-lock.json create mode 100644 docs/sliver-docs/package.json create mode 100644 docs/sliver-docs/pages/_app.tsx create mode 100644 docs/sliver-docs/pages/_document.tsx create mode 100644 docs/sliver-docs/pages/api/hello.ts create mode 100644 docs/sliver-docs/pages/index.tsx create mode 100644 docs/sliver-docs/postcss.config.js create mode 100644 docs/sliver-docs/public/.nojekyll create mode 100644 docs/sliver-docs/public/favicon.ico create mode 100644 docs/sliver-docs/public/install create mode 100644 docs/sliver-docs/public/next.svg create mode 100644 docs/sliver-docs/public/vercel.svg create mode 100644 docs/sliver-docs/styles/globals.css create mode 100644 docs/sliver-docs/tailwind.config.ts create mode 100644 docs/sliver-docs/tsconfig.json delete mode 100644 docs/sliver.service diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000000..53c033a2f1 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,87 @@ +# Sample workflow for building and deploying a Next.js site to GitHub Pages +# +# To get started with Next.js see: https://nextjs.org/docs/getting-started +# +name: Sliver Docs + +on: + # Runs on pushes targeting the default branch + push: + branches: ["master"] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + # Build job + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Detect package manager + id: detect-package-manager + run: | + if [ -f "${{ github.workspace }}/yarn.lock" ]; then + echo "manager=yarn" >> $GITHUB_OUTPUT + echo "command=install" >> $GITHUB_OUTPUT + echo "runner=yarn" >> $GITHUB_OUTPUT + exit 0 + elif [ -f "${{ github.workspace }}/package.json" ]; then + echo "manager=npm" >> $GITHUB_OUTPUT + echo "command=ci" >> $GITHUB_OUTPUT + echo "runner=npx --no-install" >> $GITHUB_OUTPUT + exit 0 + else + echo "Unable to determine package manager" + exit 1 + fi + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: "lts/*" + cache: ${{ steps.detect-package-manager.outputs.manager }} + - name: Setup Pages + uses: actions/configure-pages@v3 + - name: Restore cache + uses: actions/cache@v3 + with: + path: | + .next/cache + # Generate a new cache whenever packages or source files change. + key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }} + # If source files changed but packages didn't, rebuild from a prior cache. + restore-keys: | + ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}- + - name: Install dependencies + run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }} + - name: Build with Next.js + run: ${{ steps.detect-package-manager.outputs.runner }} next build + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + with: + path: ./out + + # Deployment job + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 diff --git a/docs/404.html b/docs/404.html deleted file mode 100644 index c472b4ea0a..0000000000 --- a/docs/404.html +++ /dev/null @@ -1,24 +0,0 @@ ---- -layout: default ---- - - - -
Page not found :(
-The requested page could not be found.
-by {{ page.author | default: site.author }}
- -{{ content }} - -{% if page.tags %} - tags: {{ page.tags | join: " - " }} -{% endif %} \ No newline at end of file diff --git a/docs/_posts/2021-07-07-getting-started.md b/docs/_posts/2021-07-07-getting-started.md deleted file mode 100644 index ba07c85e97..0000000000 --- a/docs/_posts/2021-07-07-getting-started.md +++ /dev/null @@ -1,254 +0,0 @@ ---- -layout: post -title: "Getting Started" -author: "moloch" -date: 2021-07-07 09:01:33 -0500 -categories: sliver ---- - - - -__⚠️ NOTE:__ This guide is intended for experienced red teamers, but we also have a [Beginner's Guide](https://github.com/BishopFox/sliver/wiki/Beginner's-Guide) for a more beginner friendly tutorial. - -## Server Setup - -The first thing you'll need to do is setup a Sliver server, Sliver is designed for a one server deployment per-operation. - -The server supports Linux, Windows, and MacOS however we strongly recommend running the server on a Linux (or MacOS, well really anything that isn't Windows), as some features may be more difficult to get working on a Windows server. The Windows client should work just fine when accessing a Linux/MacOS server from Windows, if for some odd reason your operators want to actually use Windows you'll just need to setup [multiplayer mode](https://github.com/BishopFox/sliver/wiki/Multiplayer-Mode). - -Download the latest sever [release](https://github.com/BishopFox/sliver/releases) for your platform, and just run the binary. That's it, you're pretty much done. - -__IMPORTANT:__ Sliver has two external dependancies for _optional_ features: MinGW and Metasploit. To enable DLL payloads you need to install MinGW. To enable some MSF integrations you'll need Metasploit installed on the server. - -### MinGW Setup (Optional, Recommended) - -In order to enable shellcode/staged/DLL payloads you'll need to install MinGW on the server (clients connecting to the server do not need it installed). By default Sliver will look in the usual places for MinGW binaries but you can override this using the [environment variables](https://github.com/BishopFox/sliver/wiki/Environment-Variables). - -#### Linux (Debian-based) - -``` -apt install mingw-w64 -``` - -#### MacOS - -``` -brew install mingw-w64 -``` - -__Note:__ On MacOS may have to configure [environment variables](https://github.com/BishopFox/sliver/wiki/Environment-Variables) for MinGW. - -### Metasploit Setup (Optional) - -We strongly recommend using the [nightly framework installers](https://github.com/rapid7/metasploit-framework/wiki/Nightly-Installers), Sliver expects MSF version 5+. - -## Implants Beacon vs. Session - -Sliver is generally designed as a stage 2 payload, and as such we've not yet endeavored to minimize the implant's file size. Depending on how many protocols you enable in your implant the file can get large, we strongly advise the use of [stagers](https://github.com/BishopFox/sliver/wiki/Stagers) for actual operations. Such is the tradeoff for getting easy static compilation in Golang. - -Sliver implants in v1.5 and later support two modes of operation: "beacon mode" and "session mode." Beacon mode implements an asynchronous communication style where the implant periodically checks in with the server retrieves tasks, executes them, and returns the results. In "session mode" the implant will create an interactive real time session using either a persistent connection or using long polling depending on the underlying C2 protocol. - -Beacons may be tasked to open interactive sessions over _any C2 protocol they were compiled with_ using the `interactive` command, i.e., if a beacon implant was not compiled with HTTP C2 it cannot open a session over HTTP (use the `close` command to close the session). Currently implants initially compiled for session mode cannot be converted to beacon mode (we may add this feature later). Take this into account during operational planning. - -Some commands such as `shell` and `portfwd` only work over interactive sessions. - -## Generating Implants - -__IMPORTANT:__ The first time you generate an implant the server needs to download some Go module code, so the server must have internet access. See [offline implant builds](https://github.com/BishopFox/sliver/wiki/Offline-Implant-Builds) if this is a problem for you. The modules are cached. - -Generating implants is done using the `generate` command, you must specify at least one C2 endpoint using `--mtls`, `--wg`, `--http`, or `--dns`. Note that when an implant attempts to connect to an endpoint specified using `--http` it will try both HTTPS and then HTTP (if HTTPS fails). We recommend using mTLS (`--mtls`) or WireGuard (`--wg`) whenever possible. You can also specify an output directory with `--save`, by default the implant will be saved to the current working directory. - -#### Session Mode - -``` -[server] sliver > generate --mtls example.com --save /Users/moloch/Desktop - -[*] Generating new windows/amd64 Sliver binary -[*] Build completed in 00:00:16 -[*] Sliver binary saved to: /Users/moloch/Desktop/NEW_GRAPE.exe -``` - -#### Beacon Mode - -``` -[server] sliver > generate beacon --mtls example.com --save /Users/moloch/Desktop - -[*] Generating new windows/amd64 beacon implant binary (1m0s) -[*] Symbol obfuscation is enabled -[*] Build completed in 00:00:27 -[*] Implant saved to /Users/moloch/Desktop/FINE_SENTENCE.exe -``` - -Sliver implants are cross-platform, you can change the compiler target with the `--os` flag. Sliver accepts any Golang GOOS and GOARCH as arguments `--os` and `--arch`, we officially only support Windows, MacOS, and Linux, but you can at least attempt to compile for any other [valid Golang GOOS/GOARCH](https://gist.github.com/asukakenji/f15ba7e588ac42795f421b48b8aede63) combination. The `generate info` command will also estimate what compiler targets can be used based on the server's host operating system and available cross-compilers. - -Some commands/features may not work on "unsupported" platforms. - -``` -sliver > generate --mtls example.com --save /Users/moloch/Desktop --os mac - -[*] Generating new darwin/amd64 Sliver binary -[*] Build completed in 00:00:09 -[*] Sliver binary saved to: /Users/moloch/Desktop/PROPER_ANTHONY -``` - -The server will also assign code names to each generated binary i.e. `NEW_GRAPE.exe` you can rename the file to anything you need to, but these code names will still uniquely identify the generated binary (they're inserted at compile-time). You can also view all previously generated implant binaries with the `implants` command: - -``` -sliver > implants - -Name OS/Arch Debug Format -==== ======= ===== ====== -CAUTIOUS_PANPIPE darwin/amd64 false EXECUTABLE -LATE_SUBCOMPONENT windows/amd64 false SHARED_LIB -RUBBER_PRINTER windows/amd64 true SHARED_LIB -RACIAL_SPECTACLES darwin/amd64 false EXECUTABLE -MATHEMATICAL_SASH darwin/amd64 true SHARED_LIB -MUSHY_TRADITIONALISM windows/amd64 false SHARED_LIB -SICK_SPY darwin/amd64 false EXECUTABLE -``` - -If you need to re-download a previously generated implant use the `regenerate` command, note that positional arguments (the implant name) comes after the command flags (e.g., `--save`): - -``` -sliver > regenerate --save /Users/moloch/Desktop NEW_GRAPE - -[*] Sliver binary saved to: /Users/moloch/Desktop/NEW_GRAPE.exe -``` - -#### Additional Details - -For addition details about each C2 please see: -* [HTTP(S) C2](https://github.com/BishopFox/sliver/wiki/HTTP(S)-C2) -* [DNS C2](https://github.com/BishopFox/sliver/wiki/DNS-C2) - -## Getting Shells - -Before you can catch the shell, you'll first need to start a listener. You use the commands `mtls`, `http`, `https`, and `dns` to start listeners for each protocol (remember endpoints specified with `--http` can connect to a `https` listener). You can use the `jobs` command to view and manage listeners running in the background. Listeners support both sessions and beacons callbacks: - -``` -sliver > mtls - -[*] Starting mTLS listener ... -[*] Successfully started job #1 - -sliver > jobs - -ID Name Protocol Port -== ==== ======== ==== -1 mTLS tcp 8888 -``` - -In this example we're using Mutual TLS, the required certificates for setting up and securing this connection have already been generated in the background and the client certificate pair was embedded into the implant at compile-time. So to get a shell you just have to run the binary on the target. - -### Interacting with Sessions - -The `use` command will tab-complete session and beacon identifiers, but you can also type them out if you really want to (identifier prefixes are accepted). Additionally, running the `use` command with no arguments will enter an interactive menu to select from. - -``` -[*] Session 8ff2ce4c LONG_DRAMATURGE - [::1]:57154 (MacBook-Pro-6.local) - darwin/amd64 - Thu, 20 Jan 2022 15:45:10 CST - -sliver > use 8ff2ce4c - -[*] Active session LONG_DRAMATURGE (8ff2ce4c-9c66-4cbc-b33c-2a56196536e6) - -sliver (LONG_DRAMATURGE) > ls - -/Users/moloch/Desktop -===================== -.DS_Store 6.0 KiB -.localized 0 B -LONG_DRAMATURGE 6.3 MiB -``` - -If you're having problems getting callbacks please see our [troubleshooting guide](https://github.com/BishopFox/sliver/wiki/Troubleshooting#implant-troubleshooting), (TL;DR add the `--debug` flag when generating an implant). - -### Interacting with Beacons - -Upon initial execution the beacon will register itself with the C2 server and will show up under `beacons`, each instance of a beacon process will get its own id and this id is used for the lifetime of that process (i.e., across key renegotiation, etc). The "Next Check-in" value includes any random jitter (by default up to 30s), and you can also watch your beacons in real time using the `beacons watch` command. Remember to leverage tab complete for the uuid when using `use`: - -``` -[*] Beacon 8c465643 RELATIVE_ADVERTISEMENT - 192.168.1.178:54701 (WIN-1TT1Q345B37) - windows/amd64 - Sat, 22 Jan 2022 14:40:55 CST - -[server] sliver > beacons - - ID Name Tasks Transport Remote Address Hostname Username Operating System Last Check-In Next Check-In -========== ======================== ======= =========== ===================== ================= =============================== ================== ================ =============== - 8c465643 RELATIVE_ADVERTISEMENT 0/0 mtls 192.168.1.178:54701 WIN-1TT1Q345B37 WIN-1TT1Q345B37\Administrator windows/amd64 49.385459s ago 37.614549s - -[server] sliver > use 8c465643-0e65-45f2-bb7e-acb3480de3cb - -[*] Active beacon RELATIVE_ADVERTISEMENT (8c465643-0e65-45f2-bb7e-acb3480de3cb) - -[server] sliver (RELATIVE_ADVERTISEMENT) > -``` - -You should see a blue prompt indicating that we're interacting with a beacon as apposed to a session (red). Commands are executed the same way as a session, though not all commands are supported in beacon mode. - -``` -[server] sliver (RELATIVE_ADVERTISEMENT) > ls - -[*] Tasked beacon RELATIVE_ADVERTISEMENT (962978a6) - -[+] RELATIVE_ADVERTISEMENT completed task 962978a6 - -C:\git -====== -drwxrwxrwx a
+ Get started by editing
+ pages/index.tsx
+
+ Find in-depth information about Next.js features and API. +
+ + + ++ Learn about Next.js in an interactive course with quizzes! +
+ + + ++ Discover and deploy boilerplate example Next.js projects. +
+ + + ++ Instantly deploy your Next.js site to a shareable URL with Vercel. +
+ +dAMQaiH zm^r3v#$Q#2T=X>bsY#D%s!bhs^M9PMAcHbCc0FMHV{u-dwlL;a1eJ63v5U*?Q_8JO zT#50!RD619#j_Uf))0ooADz~*9&lN!bBDRUgE>Vud-i5ck%vT=r^yD*^?Mp@Q^v+V zG#-?gKlr}Eeqifb{|So?HM&g91P8|av8hQoCmQXkd?7wIJw b z_^v8bbg` SAn{I*4bH$u(RZ6*x UhuA~hc=8czK8SHEKTzSxgbwi~9(OqJB&gwb^l4+m`k*Q;_?>Y-APi1{k zAHQ)P)G)f|AyjSgcCFps)Fh6Bca*Xznq36!pV6Az&m{O8$wGFD? zY&O*3*J0;_EqM#jh6^gMQKpXV?#1?>$ml1xvh8nSN>-?H=V;nJIwB07YX$e6vLxH( zqYwQ>qxwR(i4f)DLd)-$P>T-no_c!LsN@)8`e;W@)-Hj0>nJ-}Kla4-ZdPJzI&Mce zv)V_j;(3ERN3_@I$N<^|4Lf`B;8n+bX@bHbcZTopEmDI*Jfl)-pFDvo6svPRoo@(x z);_{lY<;);XzT`dBFpRmGrr}z5u1=p C^ S-{ce6iXQlLGcItwJ^mZx{m$&DA_oEZ)B{_bYPq-HA zcH8WGoBG(aBU_j)vEy+_71T34@4dmSg!|M8Vf92Zj6WH7Q7t#OHQqWgFE3ARt+%!T z?oLovLVlnf?2c7pTc)~cc^($_8nyKwsN`RA-23ed3sdj(ys%pjjM+9JrctL;dy8a( z@en&CQmnV(()bu|Y%G1-4a(6x{aLytn$T-;(&{QIJB9vMox11U-1HpD@d(QkaJdEb zG{)+6Dos_L+O3NpWo^=gR?evp|CqEG?L&Ut#D*KLaRFOgOEK(Kq1@!EGcTfo+%A&I z=dLbB+d$u{sh?u)xP{PF8L%;YPPW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hCGj1M =hu4#Aw173YxIVbISaoc z-nLZC*6Tgivd5V`K%GxhBsp@SUU60-rfc$=wb>zdJzXS&-5(NRRodFk;Kxk!S( O(a0e7oY=E( zAyS;Ow?6Q&XA+cnkCb{28_1N8H#?J!*$MmIwLq^*T_9-z^&UE@A(z9oGYtFy6EZef LrJugUA?W`A8`#=m literal 0 HcmV?d00001 diff --git a/docs/sliver-docs/public/install b/docs/sliver-docs/public/install new file mode 100644 index 0000000000..5fc7891609 --- /dev/null +++ b/docs/sliver-docs/public/install @@ -0,0 +1,191 @@ +#!/bin/bash +set -e + +SLIVER_GPG_KEY_ID="4449039C" + +if [[ "$EUID" -ne 0 ]];then + echo "Please run as root" + exit +fi + +# Determine OS type +# Debian-based OS (Debian, Ubuntu, etc) +if command -v apt &> /dev/null; then + echo "Installing dependencies using apt..." + DEBIAN_FRONTEND=noninteractive apt install -yqq \ + gpg curl build-essential git \ + mingw-w64 binutils-mingw-w64 g++-mingw-w64 + INSTALLER=(apt install -yqq) +elif command -v yum &> /dev/null; then # Redhat-based OS (Fedora, CentOS, RHEL) + echo "Installing dependencies using yum..." + yum -y install gnupg curl gcc gcc-c++ make mingw64-gcc git + INSTALLER=(yum -y) +elif command -v pacman &>/dev/null; then # Arch-based (Manjaro, Garuda, Blackarch) + echo "Installing dependencies using pacman..." + pacman -S mingw-w64-gcc mingw-w64-binutils mingw-w64-headers + INSTALLER=(pacman -S) +else + echo "Unsupported OS, exiting" + exit +fi + +# Verify if necessary tools are installed +for cmd in curl awk gpg; do + if ! command -v "$cmd" &> /dev/null; then + echo "$cmd could not be found, installing..." + ${INSTALLER[@]} "$cmd" + fi +done + +cd /root || exit +echo "Running from $(pwd)" + +echo "Importing GPG key..." +gpg --import < /etc/systemd/system/sliver.service <<-EOF +[Unit] +Description=Sliver +After=network.target +StartLimitIntervalSec=0 + +[Service] +Type=simple +Restart=on-failure +RestartSec=3 +User=root +ExecStart=/root/sliver-server daemon + +[Install] +WantedBy=multi-user.target +EOF +chown root:root /etc/systemd/system/sliver.service +chmod 600 /etc/systemd/system/sliver.service +echo "Starting the Sliver service..." +systemctl start sliver # Start the service now + +# Generate local configs +echo "Generating local configs ..." + +# Generate local configs +echo "Generating operator configs ..." +mkdir -p /root/.sliver-client/configs +/root/sliver-server operator --name root --lhost localhost --save /root/.sliver-client/configs +chown -R root:root /root/.sliver-client/ + +USER_DIRS=(/home/*) +for USER_DIR in "${USER_DIRS[@]}"; do + USER=$(basename "$USER_DIR") + if id -u "$USER" >/dev/null 2>&1; then + echo "Generating operator configs for user $USER..." + mkdir -p "$USER_DIR/.sliver-client/configs" + /root/sliver-server operator --name "$USER" --lhost localhost --save "$USER_DIR/.sliver-client/configs" + chown -R "$USER":"$(id -gn "$USER")" "$USER_DIR/.sliver-client/" + fi +done diff --git a/docs/sliver-docs/public/next.svg b/docs/sliver-docs/public/next.svg new file mode 100644 index 0000000000..5174b28c56 --- /dev/null +++ b/docs/sliver-docs/public/next.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/sliver-docs/public/vercel.svg b/docs/sliver-docs/public/vercel.svg new file mode 100644 index 0000000000..d2f8422273 --- /dev/null +++ b/docs/sliver-docs/public/vercel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/sliver-docs/styles/globals.css b/docs/sliver-docs/styles/globals.css new file mode 100644 index 0000000000..fd81e88583 --- /dev/null +++ b/docs/sliver-docs/styles/globals.css @@ -0,0 +1,27 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; + +:root { + --foreground-rgb: 0, 0, 0; + --background-start-rgb: 214, 219, 220; + --background-end-rgb: 255, 255, 255; +} + +@media (prefers-color-scheme: dark) { + :root { + --foreground-rgb: 255, 255, 255; + --background-start-rgb: 0, 0, 0; + --background-end-rgb: 0, 0, 0; + } +} + +body { + color: rgb(var(--foreground-rgb)); + background: linear-gradient( + to bottom, + transparent, + rgb(var(--background-end-rgb)) + ) + rgb(var(--background-start-rgb)); +} diff --git a/docs/sliver-docs/tailwind.config.ts b/docs/sliver-docs/tailwind.config.ts new file mode 100644 index 0000000000..c7ead80465 --- /dev/null +++ b/docs/sliver-docs/tailwind.config.ts @@ -0,0 +1,20 @@ +import type { Config } from 'tailwindcss' + +const config: Config = { + content: [ + './pages/**/*.{js,ts,jsx,tsx,mdx}', + './components/**/*.{js,ts,jsx,tsx,mdx}', + './app/**/*.{js,ts,jsx,tsx,mdx}', + ], + theme: { + extend: { + backgroundImage: { + 'gradient-radial': 'radial-gradient(var(--tw-gradient-stops))', + 'gradient-conic': + 'conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))', + }, + }, + }, + plugins: [], +} +export default config diff --git a/docs/sliver-docs/tsconfig.json b/docs/sliver-docs/tsconfig.json new file mode 100644 index 0000000000..670224f3e9 --- /dev/null +++ b/docs/sliver-docs/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "target": "es5", + "lib": ["dom", "dom.iterable", "esnext"], + "allowJs": true, + "skipLibCheck": true, + "strict": true, + "noEmit": true, + "esModuleInterop": true, + "module": "esnext", + "moduleResolution": "bundler", + "resolveJsonModule": true, + "isolatedModules": true, + "jsx": "preserve", + "incremental": true, + "paths": { + "@/*": ["./*"] + } + }, + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], + "exclude": ["node_modules"] +} diff --git a/docs/sliver.service b/docs/sliver.service deleted file mode 100644 index 62ca6b3ed1..0000000000 --- a/docs/sliver.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=Sliver -After=network.target -StartLimitIntervalSec=0 - -[Service] -Type=simple -Restart=on-failure -RestartSec=3 -User=root -ExecStart=/root/sliver-server daemon - -[Install] -WantedBy=multi-user.target