Skip to content

Commit

Permalink
Merge branch 'gae-server-upgrade'
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael-X-Net committed Dec 3, 2023
2 parents 2e06365 + df2210a commit d7e9225
Show file tree
Hide file tree
Showing 11 changed files with 848 additions and 902 deletions.
2 changes: 1 addition & 1 deletion code/default/gae_proxy/local/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def __init__(self, fn):

# gae
self.set_var("GAE_PASSWORD", "")
self.set_var("GAE_VALIDATE", 0)
self.set_var("GAE_VALIDATE", 1)

# host rules
self.set_var("hosts_direct", [
Expand Down
5 changes: 4 additions & 1 deletion code/default/gae_proxy/server/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## 设置使用密码:
如果你担心流量被别人使用,可以设置使用密码。
编辑gae.py 里的 __password__
编辑main.py 里的 __password____
注意在客户端中也需要设置一样的密码才能访问。
一般你不泄露appid,别人是无法使用你的流量的。

Expand All @@ -21,6 +21,9 @@ https://cloud.google.com/sdk/docs/install
`gcloud init`


## 未绑定信用卡的需要绑定:
https://console.cloud.google.com/billing/enable

## 部署:
`cd XX-Net/code/default/gae_proxy/server/gae`
`gcloud app deploy`
Expand Down
19 changes: 19 additions & 0 deletions code/default/gae_proxy/server/gae/.gcloudignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# This file specifies files that are *not* uploaded to Google Cloud
# using gcloud. It follows the same syntax as .gitignore, with the addition of
# "#!include" directives (which insert the entries of the given .gitignore-style
# file at that point).
#
# For more information, run:
# $ gcloud topic gcloudignore
#
.gcloudignore
# If you would like to upload your .git directory, .gitignore file or files
# from your .gitignore file, remove the corresponding line
# below:
.git
.gitignore

# Python pycache:
__pycache__/
# Ignored by the build system
/setup.cfg
34 changes: 3 additions & 31 deletions code/default/gae_proxy/server/gae/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,7 @@ instance_class: F1
automatic_scaling:
max_instances: 1

runtime: python27
api_version: 1
threadsafe: true
runtime: python312
app_engine_apis: true

handlers:
- url: /_gh/.*
script: gae.application
secure: optional

- url: /2
script: wsgi.gae_application
secure: optional

- url: /tasks/reset
script: gae.reset
secure: optional

- url: /traffic
script: gae.traffic
secure: optional

- url: /favicon.ico
script: gae.application
secure: optional

- url: /.*
script: legacy.application
secure: optional

libraries:
- name: pycrypto
version: "latest"
entrypoint: gunicorn -c gunicorn.conf.py --timeout 60 -b :$PORT main:app
Loading

0 comments on commit d7e9225

Please sign in to comment.