Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
apaas-meshproxy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gzga-jzapi
apaas-meshproxy
Commits
bd8c064a
You need to sign in or sign up before continuing.
Commit
bd8c064a
authored
Dec 10, 2021
by
孙江梦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加日志打印
parent
0fc40bd2
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
9 deletions
+12
-9
.beagle.yml
.beagle.yml
+8
-8
go.sum
go.sum
+1
-0
src/handler/proxyhandler.go
src/handler/proxyhandler.go
+3
-1
No files found.
.beagle.yml
View file @
bd8c064a
...
@@ -30,7 +30,7 @@ pipeline:
...
@@ -30,7 +30,7 @@ pipeline:
base
:
registry.cn-qingdao.aliyuncs.com/wod/alpine:3.12
base
:
registry.cn-qingdao.aliyuncs.com/wod/alpine:3.12
dockerfile
:
build/dockerfile
dockerfile
:
build/dockerfile
repo
:
wod/apaas-meshproxy
repo
:
wod/apaas-meshproxy
version
:
v3.0.
0
version
:
v3.0.
1
channel
:
alpha
channel
:
alpha
args
:
"
TARGETOS=linux,TARGETARCH=amd64"
args
:
"
TARGETOS=linux,TARGETARCH=amd64"
registry
:
registry.cn-qingdao.aliyuncs.com
registry
:
registry.cn-qingdao.aliyuncs.com
...
@@ -47,8 +47,8 @@ pipeline:
...
@@ -47,8 +47,8 @@ pipeline:
dns
:
223.5.5.5
dns
:
223.5.5.5
volumes
:
volumes
:
-
/var/run/docker.sock:/var/run/docker.sock
-
/var/run/docker.sock:/var/run/docker.sock
source
:
registry.cn-qingdao.aliyuncs.com/wod/apaas-meshproxy:v3.0.
0
-alpha
source
:
registry.cn-qingdao.aliyuncs.com/wod/apaas-meshproxy:v3.0.
1
-alpha
target
:
registry.cn-qingdao.aliyuncs.com/wod/apaas-meshproxy:v3.0.
0
target
:
registry.cn-qingdao.aliyuncs.com/wod/apaas-meshproxy:v3.0.
1
registry
:
registry.cn-qingdao.aliyuncs.com
registry
:
registry.cn-qingdao.aliyuncs.com
secrets
:
secrets
:
-
source
:
REGISTRY_USER_ALIYUN
-
source
:
REGISTRY_USER_ALIYUN
...
@@ -63,7 +63,7 @@ pipeline:
...
@@ -63,7 +63,7 @@ pipeline:
dns
:
223.5.5.5
dns
:
223.5.5.5
volumes
:
volumes
:
-
/var/run/docker.sock:/var/run/docker.sock
-
/var/run/docker.sock:/var/run/docker.sock
source
:
registry.cn-qingdao.aliyuncs.com/wod/apaas-meshproxy:v3.0.
0
source
:
registry.cn-qingdao.aliyuncs.com/wod/apaas-meshproxy:v3.0.
1
target
:
registry.cn-qingdao.aliyuncs.com/wod/apaas-meshproxy:v3.0
target
:
registry.cn-qingdao.aliyuncs.com/wod/apaas-meshproxy:v3.0
registry
:
registry.cn-qingdao.aliyuncs.com
registry
:
registry.cn-qingdao.aliyuncs.com
secrets
:
secrets
:
...
@@ -83,7 +83,7 @@ pipeline:
...
@@ -83,7 +83,7 @@ pipeline:
base
:
registry.cn-qingdao.aliyuncs.com/wod/alpine:3.12-arm64
base
:
registry.cn-qingdao.aliyuncs.com/wod/alpine:3.12-arm64
dockerfile
:
build/dockerfile
dockerfile
:
build/dockerfile
repo
:
wod/apaas-meshproxy
repo
:
wod/apaas-meshproxy
version
:
"
v3.0.
0
"
version
:
"
v3.0.
1
"
channel
:
alpha-arm64
channel
:
alpha-arm64
args
:
"
TARGETOS=linux,TARGETARCH=arm64"
args
:
"
TARGETOS=linux,TARGETARCH=arm64"
registry
:
registry.cn-qingdao.aliyuncs.com
registry
:
registry.cn-qingdao.aliyuncs.com
...
@@ -100,8 +100,8 @@ pipeline:
...
@@ -100,8 +100,8 @@ pipeline:
dns
:
223.5.5.5
dns
:
223.5.5.5
volumes
:
volumes
:
-
/var/run/docker.sock:/var/run/docker.sock
-
/var/run/docker.sock:/var/run/docker.sock
source
:
registry.cn-qingdao.aliyuncs.com/wod/apaas-meshproxy:v3.0.
0
-alpha-arm64
source
:
registry.cn-qingdao.aliyuncs.com/wod/apaas-meshproxy:v3.0.
1
-alpha-arm64
target
:
registry.cn-qingdao.aliyuncs.com/wod/apaas-meshproxy:v3.0.
0
-arm64
target
:
registry.cn-qingdao.aliyuncs.com/wod/apaas-meshproxy:v3.0.
1
-arm64
registry
:
registry.cn-qingdao.aliyuncs.com
registry
:
registry.cn-qingdao.aliyuncs.com
secrets
:
secrets
:
-
source
:
REGISTRY_USER_ALIYUN
-
source
:
REGISTRY_USER_ALIYUN
...
@@ -116,7 +116,7 @@ pipeline:
...
@@ -116,7 +116,7 @@ pipeline:
dns
:
223.5.5.5
dns
:
223.5.5.5
volumes
:
volumes
:
-
/var/run/docker.sock:/var/run/docker.sock
-
/var/run/docker.sock:/var/run/docker.sock
source
:
registry.cn-qingdao.aliyuncs.com/wod/apaas-meshproxy:v3.0.
0
-arm64
source
:
registry.cn-qingdao.aliyuncs.com/wod/apaas-meshproxy:v3.0.
1
-arm64
target
:
registry.cn-qingdao.aliyuncs.com/wod/apaas-meshproxy:v3.0-arm64
target
:
registry.cn-qingdao.aliyuncs.com/wod/apaas-meshproxy:v3.0-arm64
registry
:
registry.cn-qingdao.aliyuncs.com
registry
:
registry.cn-qingdao.aliyuncs.com
secrets
:
secrets
:
...
...
go.sum
View file @
bd8c064a
...
@@ -22,6 +22,7 @@ github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE
...
@@ -22,6 +22,7 @@ github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo=
github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
...
...
src/handler/proxyhandler.go
View file @
bd8c064a
...
@@ -73,7 +73,7 @@ func Proxy(c *gin.Context) {
...
@@ -73,7 +73,7 @@ func Proxy(c *gin.Context) {
c
.
JSON
(
200
,
res
)
c
.
JSON
(
200
,
res
)
return
return
}
}
fmt
.
Println
(
"判断是否为静态文件"
)
//如果是静态文件
//如果是静态文件
if
CheckStaticFile
(
c
.
Request
.
URL
.
Path
)
{
if
CheckStaticFile
(
c
.
Request
.
URL
.
Path
)
{
host
:=
getHost
(
proxyData
.
ReqUrl
)
host
:=
getHost
(
proxyData
.
ReqUrl
)
...
@@ -92,6 +92,7 @@ func Proxy(c *gin.Context) {
...
@@ -92,6 +92,7 @@ func Proxy(c *gin.Context) {
c
.
Request
.
Host
=
host
c
.
Request
.
Host
=
host
fwd
.
ServeHTTP
(
c
.
Writer
,
c
.
Request
)
fwd
.
ServeHTTP
(
c
.
Writer
,
c
.
Request
)
}
else
{
}
else
{
fmt
.
Println
(
"开始代理"
)
roundTripper
:=
http
.
DefaultTransport
.
(
*
http
.
Transport
)
roundTripper
:=
http
.
DefaultTransport
.
(
*
http
.
Transport
)
//roundTripper.ForceAttemptHTTP2 = false
//roundTripper.ForceAttemptHTTP2 = false
roundTripper
.
TLSClientConfig
=
&
tls
.
Config
{
InsecureSkipVerify
:
true
}
roundTripper
.
TLSClientConfig
=
&
tls
.
Config
{
InsecureSkipVerify
:
true
}
...
@@ -161,6 +162,7 @@ func Proxy(c *gin.Context) {
...
@@ -161,6 +162,7 @@ func Proxy(c *gin.Context) {
return
return
}
}
reqURL
:=
testutils
.
ParseURI
(
proxyData
.
ReqUrl
)
reqURL
:=
testutils
.
ParseURI
(
proxyData
.
ReqUrl
)
fmt
.
Println
(
reqURL
)
if
reqURL
.
RawQuery
==
""
{
if
reqURL
.
RawQuery
==
""
{
reqURL
.
RawQuery
=
c
.
Request
.
URL
.
RawQuery
reqURL
.
RawQuery
=
c
.
Request
.
URL
.
RawQuery
}
else
{
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment