Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
spacemeowx2 committed Dec 18, 2023
1 parent c097531 commit db49d48
Show file tree
Hide file tree
Showing 32 changed files with 16,079 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
3 changes: 3 additions & 0 deletions docs/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"typescript.tsdk": "node_modules/typescript/lib"
}
41 changes: 41 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Website

This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.

### Installation

```
$ yarn
```

### Local Development

```
$ yarn start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

### Build

```
$ yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

### Deployment

Using SSH:

```
$ USE_SSH=true yarn deploy
```

Not using SSH:

```
$ GIT_USER=<Your GitHub username> yarn deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
3 changes: 3 additions & 0 deletions docs/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
76 changes: 76 additions & 0 deletions docs/docs/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
---
sidebar_position: 1
---

# Introduction

`rabbit-digger` is a proxy software written in [Rust](https://www.rust-lang.org/).


It is still in the ~~rapid~~ *slowly* development stage. The documentation may not be consistent with actual usage, so please [submit an issue](https://github.com/rabbit-digger/rabbit-digger.github.io/issues/new) if you find any inconsistencies.

## Supported Protocol

* Shadowsocks
* Trojan
* HTTP
* Socks5
* obfs(http_simple)

## Supported Server Protocol

* Socks5
* HTTP
* http+socks on the same port
* Shadowsocks


# Installation

Go to the [Release page](https://github.com/rabbit-digger/rabbit-digger-pro/releases) to download the binary file.

# Common Usage

## Normal mode

```
rabbit-digger-pro -c config.example.yaml
```

## Normal mode + Control port + Access Token

```
rabbit-digger-pro -c config.example.yaml -b 127.0.0.1:8030 --access-token token
```

## Control mode, without any config at launch

```
rabbit-digger-pro server -b 127.0.0.1:8030 --access-token token
```

# Command line parameters

```
rabbit-digger-pro 0.1.0
USAGE:
rabbit-digger-pro [OPTIONS] [SUBCOMMAND]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
--access-token <access-token> Access token [env: RD_ACCESS_TOKEN=]
-b, --bind <bind> HTTP endpoint bind address [env: RD_BIND=]
-c, --config <config> Path to config file [env: RD_CONFIG=] [default: config.yaml]
--userdata <userdata> Userdata [env: RD_USERDATA=]
--web-ui <web-ui> Web UI. Folder path [env: RD_WEB_UI=]
--write-config <write-config> Write generated config to path
SUBCOMMANDS:
generate-schema Generate schema to path, if not present, output to stdout
help Prints this message or the help of the given subcommand(s)
server Run in server mode
```
8 changes: 8 additions & 0 deletions docs/docs/tutorial-basics/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"label": "Tutorial - Basics",
"position": 2,
"link": {
"type": "generated-index",
"description": "5 minutes to learn the most important Docusaurus concepts."
}
}
88 changes: 88 additions & 0 deletions docs/docusaurus.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
import type { Config } from '@docusaurus/types';
import { themes } from 'prism-react-renderer';

const config: Config = {
title: 'Rabbit Digger Pro',
tagline: '由 Rust 编写的一体化代理工具',
favicon: 'img/favicon.ico',

// Set the production url of your site here
url: 'https://rabbit-digger.com',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/',

// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: 'rabbit-digger', // Usually your GitHub org/user name.
projectName: 'rabbit-digger-pro', // Usually your repo name.

onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',

// Even if you don't use internalization, you can use this field to set useful
// metadata like html lang. For example, if your site is Chinese, you may want
// to replace "en" with "zh-Hans".
i18n: {
defaultLocale: 'zh-CN',
locales: ['zh-CN', 'en'],
},

presets: [
[
'classic',
({
docs: {
sidebarPath: require.resolve('./sidebars.js'),
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl:
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
}),
],
],

themeConfig:
({
// Replace with your project's social card
image: 'img/docusaurus-social-card.jpg',
navbar: {
title: 'Rabbit Digger Pro',
logo: {
alt: 'Rabbit Digger Pro',
src: 'img/logo.svg',
},
items: [
{
type: 'docSidebar',
sidebarId: 'tutorialSidebar',
position: 'left',
label: '教程',
},
{
href: 'https://github.com/rabbit-digger/rabbit-digger-pro',
label: 'GitHub',
position: 'right',
},
{
type: 'localeDropdown',
position: 'right',
},
],
},
footer: {
style: 'dark',
copyright: `Copyright © ${new Date().getFullYear()} Rabbit Digger Pro. Built with Docusaurus.`,
},
prism: {
theme: themes.github,
darkTheme: themes.dracula,
},
}),
};

export default config;
35 changes: 35 additions & 0 deletions docs/i18n/zh-CN/config/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
sidebar: auto
---

# 配置

Rabbit Digger 支持任意个数的 `server``net`.

`net` 代表着一种虚拟的网络. 它可以是本地网络, 也可以通过代理提供的网络. 甚至连规则也是一种 `net`.

每个 `net` 都有它的名字和类型. `name` 就是键名, 而 `type` 代表了它的类型.
除了 `local` 类型的 `net` 和一些特殊类型的 `net`, 其他的 `net` 一般都需要基于另一个 `net` 才能生效.

实际上在 `Rabbit Digger Pro` 中大部分代理协议的配置都可以通过添加 `net` 字段来实现链式代理.

`server` 代表着代理服务器. 它可以是一个 `http` 服务器, 也可以是一个 `socks5` 服务器, 大多数情况下你可以使用 `http+socks5` 服务器.

你可以在不同的端口上同时部署多种服务器.

下图是一种典型配置的示意图:

```mermaid
graph LR;
A1(["server"]) -->|net| N1("net(rule)");
A2(["server"]) -->|net| N1;
N1 --> N2("net");
N1 --> N3("net");
N1 --> N4("net");
N1 --> N5("...");
N2 --> L("net(local)");
N3 --> L;
N4 --> L;
N5 --> L;
N1 --> L;
```
24 changes: 24 additions & 0 deletions docs/i18n/zh-CN/guide/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
sidebarDepth: 2
---

# 介绍

`rabbit-digger` 是由 [Rust](https://www.rust-lang.org/) 编写的代理软件.

目前还处于快速开发阶段. 文档可能与实际用法不一致, 如果有发现不一致请 [提交issue](https://github.com/rabbit-digger/rabbit-digger.github.io/issues/new).

## 支持的代理协议

* Shadowsocks
* Trojan
* HTTP
* Socks5
* obfs(http_simple)

## 支持的服务器协议

* Socks5
* HTTP
* http+socks on the same port
* Shadowsocks
11 changes: 11 additions & 0 deletions docs/i18n/zh-CN/guide/installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# 安装

前往 [Release页面](https://github.com/rabbit-digger/rabbit-digger-pro/releases) 下载对应平台的二进制文件.

* Windows 用户: `rabbit-digger-pro-windows-amd64.exe`
* Mac 用户: `rabbit-digger-pro-macos-amd64`
* Linux 用户: `rabbit-digger-pro-x86_64-unknown-linux-musl`

下载后, 将二进制文件放到任意目录下.

本文档之后会使用 `./rabbit-digger-pro` 作为命令调用. 因此可以将文件重命名为 `rabbit-digger-pro`.
Loading

0 comments on commit db49d48

Please sign in to comment.