darkfire514 commited on
Commit
dd1a3d8
·
verified ·
1 Parent(s): 8a75e0e

Upload start.sh

Browse files
Files changed (1) hide show
  1. start.sh +10 -16
start.sh CHANGED
@@ -90,7 +90,7 @@ echo "Starting oauth2-proxy on 127.0.0.1:4180..."
90
 
91
  cat <<EOF > /tmp/oauth2-proxy-alpha-config.yaml
92
  server:
93
- BindAddress: "127.0.0.1:4180"
94
 
95
  injectRequestHeaders:
96
  - name: X-Forwarded-User
@@ -145,23 +145,17 @@ upstreamConfig:
145
  path: /terminal/
146
  uri: http://127.0.0.1:7681
147
 
148
- cookie:
149
- secret: "$OAUTH2_PROXY_COOKIE_SECRET"
150
- secure: true
151
- httpOnly: true
152
- expire: 168h
153
- refresh: 1h
154
- domains:
155
- - "*"
 
156
  EOF
157
 
158
- # 如果有 AUTH_FILE,添加到 Alpha Config (注意: 格式可能需要调整,这里仅尝试注入)
159
- # 目前 Alpha Config 的 validator 比较复杂,我们先通过简单的 email 域检查
160
- # 如果 AUTH_FILE 非空,我们可以通过命令行参数覆盖部分配置,但 alpha-config 模式下通常不建议混用
161
- # 最好的办法是把 email 列表直接嵌入到 config 中,但列表可能很长
162
- # 暂时忽略 authenticated-emails-file 的文件引用,而是通过简单的 emailDomains="*" 来允许所有
163
- # (假设用户会自行控制 ALLOWED_USERS)
164
-
165
 
166
  # 启动 oauth2-proxy (使用 alpha-config)
167
  echo "Starting oauth2-proxy with Alpha Configuration..."
 
90
 
91
  cat <<EOF > /tmp/oauth2-proxy-alpha-config.yaml
92
  server:
93
+ bindAddress: "127.0.0.1:4180"
94
 
95
  injectRequestHeaders:
96
  - name: X-Forwarded-User
 
145
  path: /terminal/
146
  uri: http://127.0.0.1:7681
147
 
148
+ session:
149
+ cookie:
150
+ secret: "$OAUTH2_PROXY_COOKIE_SECRET"
151
+ secure: true
152
+ httpOnly: true
153
+ expire: 168h
154
+ refresh: 1h
155
+ domains:
156
+ - "*"
157
  EOF
158
 
 
 
 
 
 
 
 
159
 
160
  # 启动 oauth2-proxy (使用 alpha-config)
161
  echo "Starting oauth2-proxy with Alpha Configuration..."