Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
gzupanda
code-server
提交
4023d7fe
C
code-server
项目概览
gzupanda
/
code-server
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
code-server
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
4023d7fe
编写于
12月 14, 2020
作者:
J
Joe Previte
提交者:
GitHub
12月 14, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' into issue-2328-customize-go-home
上级
9b2c438d
244afa40
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
37 addition
and
32 deletion
+37
-32
README.md
README.md
+2
-2
doc/FAQ.md
doc/FAQ.md
+11
-0
src/node/cli.ts
src/node/cli.ts
+19
-29
src/node/routes/index.ts
src/node/routes/index.ts
+5
-1
未找到文件。
README.md
浏览文件 @
4023d7fe
...
...
@@ -33,10 +33,10 @@ When done, the install script prints out instructions for running and starting c
We also have an in-depth
[
setup and configuration
](
./doc/guide.md
)
guide.
###
Alpha Program 🐣
###
Cloud Program ☁️
We're working on a cloud platform that makes deploying and managing code-server easier.
Consider
updating to the latest version and running code-server with our experimental
flag
`--link`
if you don't want to worry about
Consider
running code-server with the beta
flag
`--link`
if you don't want to worry about
-
TLS
-
Authentication
...
...
doc/FAQ.md
浏览文件 @
4023d7fe
...
...
@@ -11,6 +11,7 @@
-
[
Where are extensions stored?
](
#where-are-extensions-stored
)
-
[
How is this different from VS Code Codespaces?
](
#how-is-this-different-from-vs-code-codespaces
)
-
[
How should I expose code-server to the internet?
](
#how-should-i-expose-code-server-to-the-internet
)
-
[
Can I store my password hashed?
](
#can-i-store-my-password-hashed
)
-
[
How do I securely access web services?
](
#how-do-i-securely-access-web-services
)
-
[
Sub-paths
](
#sub-paths
)
-
[
Sub-domains
](
#sub-domains
)
...
...
@@ -160,6 +161,16 @@ for free.
Again, please follow
[
./guide.md
](
./guide.md
)
for our recommendations on setting up and using code-server.
## Can I store my password hashed?
Yes you can! Use
`hashedPassword`
instead of
`password`
. Generate the hash with:
```
echo "thisismypassword" | sha256sum | cut -d' ' -f1
```
Of course replace
`"thisismypassword"`
with your actual password.
## How do I securely access web services?
code-server is capable of proxying to any port using either a subdomain or a
...
...
src/node/cli.ts
浏览文件 @
4023d7fe
...
...
@@ -75,7 +75,7 @@ interface Option<T> {
description
?:
string
/**
* If marked as beta, the option is
not printed unless $CS_BETA is set
.
* If marked as beta, the option is
marked as beta in help
.
*/
beta
?:
boolean
}
...
...
@@ -194,8 +194,6 @@ const options: Options<Required<Args>> = {
Securely bind code-server via Coder Cloud with the passed name. You'll get a URL like
https://myname.coder-cloud.com at which you can easily access your code-server instance.
Authorization is done via GitHub.
This is presently beta and requires being accepted for testing.
See https://github.com/cdr/code-server/discussions/2137
`
,
beta
:
true
,
},
...
...
@@ -214,32 +212,24 @@ export const optionDescriptions = (): string[] => {
}),
{
short
:
0
,
long
:
0
},
)
return
entries
.
filter
(([,
v
])
=>
{
// If CS_BETA is set, we show beta options but if not, then we do not want
// to show beta options.
return
process
.
env
.
CS_BETA
||
!
v
.
beta
})
.
map
(([
k
,
v
])
=>
{
const
help
=
`
${
"
"
.
repeat
(
widths
.
short
-
(
v
.
short
?
v
.
short
.
length
:
0
))}${
v
.
short
?
`-
${
v
.
short
}
`
:
"
"
}
--
${
k
}
`
return
(
help
+
v
.
description
?.
trim
()
.
split
(
/
\n
/
)
.
map
((
line
,
i
)
=>
{
line
=
line
.
trim
()
if
(
i
===
0
)
{
return
"
"
.
repeat
(
widths
.
long
-
k
.
length
)
+
line
}
return
"
"
.
repeat
(
widths
.
long
+
widths
.
short
+
6
)
+
line
})
.
join
(
"
\n
"
)
+
(
typeof
v
.
type
===
"
object
"
?
` [
${
Object
.
values
(
v
.
type
).
join
(
"
,
"
)}
]`
:
""
)
)
})
return
entries
.
map
(([
k
,
v
])
=>
{
const
help
=
`
${
"
"
.
repeat
(
widths
.
short
-
(
v
.
short
?
v
.
short
.
length
:
0
))}${
v
.
short
?
`-
${
v
.
short
}
`
:
"
"
}
--
${
k
}
`
return
(
help
+
v
.
description
?.
trim
()
.
split
(
/
\n
/
)
.
map
((
line
,
i
)
=>
{
line
=
line
.
trim
()
if
(
i
===
0
)
{
return
"
"
.
repeat
(
widths
.
long
-
k
.
length
)
+
(
v
.
beta
?
"
(beta)
"
:
""
)
+
line
}
return
"
"
.
repeat
(
widths
.
long
+
widths
.
short
+
6
)
+
line
})
.
join
(
"
\n
"
)
+
(
typeof
v
.
type
===
"
object
"
?
` [
${
Object
.
values
(
v
.
type
).
join
(
"
,
"
)}
]`
:
""
)
)
})
}
export
const
parse
=
(
...
...
src/node/routes/index.ts
浏览文件 @
4023d7fe
...
...
@@ -11,7 +11,7 @@ import { plural } from "../../common/util"
import
{
AuthType
,
DefaultedArgs
}
from
"
../cli
"
import
{
rootPath
}
from
"
../constants
"
import
{
Heart
}
from
"
../heart
"
import
{
replaceTemplates
}
from
"
../http
"
import
{
replaceTemplates
,
redirect
}
from
"
../http
"
import
{
PluginAPI
}
from
"
../plugin
"
import
{
getMediaMime
,
paths
}
from
"
../util
"
import
{
WebsocketRequest
}
from
"
../wsRouter
"
...
...
@@ -112,6 +112,10 @@ export const register = async (
if
(
args
.
auth
===
AuthType
.
Password
)
{
app
.
use
(
"
/login
"
,
login
.
router
)
}
else
{
app
.
all
(
"
/login
"
,
(
req
,
res
)
=>
{
redirect
(
req
,
res
,
"
/
"
,
{})
})
}
app
.
use
(
"
/proxy
"
,
proxy
.
router
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录