Skip to content

Commit fe5fb03

Browse files
authored
Merge pull request fatedier#2955 from fatedier/dev
bump version to v0.43.0
2 parents eb1e19a + 0711295 commit fe5fb03

File tree

30 files changed

+652
-424
lines changed

30 files changed

+652
-424
lines changed

.github/workflows/build-and-push-image.yml

Lines changed: 33 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -10,43 +10,9 @@ on:
1010
required: true
1111
default: 'test'
1212
jobs:
13-
binary:
14-
name: Build Golang project
15-
runs-on: ubuntu-latest
16-
steps:
17-
- name: Set up Go 1.x
18-
uses: actions/setup-go@v2
19-
with:
20-
go-version: 1.18
21-
22-
- run: |
23-
# https://github.com/actions/setup-go/issues/107
24-
cp -f `which go` /usr/bin/go
25-
26-
- run: go version
27-
28-
- name: Check out code into the Go module directory
29-
uses: actions/checkout@v2
30-
31-
- name: Build
32-
run: make build
33-
34-
- name: Archive artifacts for frpc
35-
uses: actions/upload-artifact@v1
36-
with:
37-
name: frpc
38-
path: bin/frpc
39-
40-
- name: Archive artifacts for frps
41-
uses: actions/upload-artifact@v1
42-
with:
43-
name: frps
44-
path: bin/frps
45-
4613
image:
4714
name: Build Image from Dockerfile and binaries
4815
runs-on: ubuntu-latest
49-
needs: binary
5016
steps:
5117
# environment
5218
- name: Checkout
@@ -60,19 +26,6 @@ jobs:
6026
- name: Set up Docker Buildx
6127
uses: docker/setup-buildx-action@v1
6228

63-
# download binaries of frpc and frps
64-
- name: Download binary of frpc
65-
uses: actions/download-artifact@v2
66-
with:
67-
name: frpc
68-
path: bin/frpc
69-
70-
- name: Download binary of frps
71-
uses: actions/download-artifact@v2
72-
with:
73-
name: frps
74-
path: bin/frps
75-
7629
# get image tag name
7730
- name: Get Image Tag Name
7831
run: |
@@ -81,6 +34,18 @@ jobs:
8134
else
8235
echo "TAG_NAME=${{ github.event.inputs.tag }}" >> $GITHUB_ENV
8336
fi
37+
- name: Login to DockerHub
38+
uses: docker/login-action@v1
39+
with:
40+
username: ${{ secrets.DOCKERHUB_USERNAME }}
41+
password: ${{ secrets.DOCKERHUB_PASSWORD }}
42+
43+
- name: Login to the GPR
44+
uses: docker/login-action@v1
45+
with:
46+
registry: ghcr.io
47+
username: ${{ github.repository_owner }}
48+
password: ${{ secrets.GPR_TOKEN }}
8449

8550
# prepare image tags
8651
- name: Prepare Image Tags
@@ -92,26 +57,24 @@ jobs:
9257
echo "TAG_FRPC_GPR=ghcr.io/fatedier/frpc:${{ env.TAG_NAME }}" >> $GITHUB_ENV
9358
echo "TAG_FRPS_GPR=ghcr.io/fatedier/frps:${{ env.TAG_NAME }}" >> $GITHUB_ENV
9459
95-
# build images
96-
- name: Build Images
97-
run: |
98-
# for Docker hub
99-
docker build --file ${{ env.DOCKERFILE_FRPC_PATH }} --tag ${{ env.TAG_FRPC }} .
100-
docker build --file ${{ env.DOCKERFILE_FRPS_PATH }} --tag ${{ env.TAG_FRPS }} .
101-
# for GPR
102-
docker build --file ${{ env.DOCKERFILE_FRPC_PATH }} --tag ${{ env.TAG_FRPC_GPR }} .
103-
docker build --file ${{ env.DOCKERFILE_FRPS_PATH }} --tag ${{ env.TAG_FRPS_GPR }} .
104-
105-
# push to dockerhub
106-
- name: Publish to Dockerhub
107-
run: |
108-
echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login --username ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
109-
docker push ${{ env.TAG_FRPC }}
110-
docker push ${{ env.TAG_FRPS }}
111-
112-
# push to gpr
113-
- name: Publish to GPR
114-
run: |
115-
echo ${{ secrets.GPR_TOKEN }} | docker login ghcr.io --username ${{ github.repository_owner }} --password-stdin
116-
docker push ${{ env.TAG_FRPC_GPR }}
117-
docker push ${{ env.TAG_FRPS_GPR }}
60+
- name: Build and push frpc
61+
uses: docker/build-push-action@v2
62+
with:
63+
context: .
64+
file: ./dockerfiles/Dockerfile-for-frpc
65+
platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x
66+
push: true
67+
tags: |
68+
${{ env.TAG_FRPC }}
69+
${{ env.TAG_FRPC_GPR }}
70+
71+
- name: Build and push frps
72+
uses: docker/build-push-action@v2
73+
with:
74+
context: .
75+
file: ./dockerfiles/Dockerfile-for-frps
76+
platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x
77+
push: true
78+
tags: |
79+
${{ env.TAG_FRPS }}
80+
${{ env.TAG_FRPS_GPR }}

Release.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
### New
22

3-
* Added new parameter `config_dir` in frpc to run multiple client instances in one process.
4-
5-
### Fix
6-
7-
* Equal sign in environment variables causes parsing error.
3+
* Added `route_by_http_user` in `http` and `tcpmux` proxy to support route to different clients by HTTP basic auth user.
4+
* `CONNECT` method can be forwarded in `http` type proxy.
5+
* Added `tcpmux_passthrough` in `tcpmux` proxy. If true, `CONNECT` request will be forwarded to frpc.

conf/frpc_full.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,8 @@ subdomain = web01
216216
custom_domains = web01.yourdomain.com
217217
# locations is only available for http type
218218
locations = /,/pic
219+
# route requests to this service if http basic auto user is abc
220+
# route_by_http_user = abc
219221
host_header_rewrite = example.com
220222
# params with prefix "header_" will be used to update http request headers
221223
header_X-From-Where = frp
@@ -348,3 +350,4 @@ multiplexer = httpconnect
348350
local_ip = 127.0.0.1
349351
local_port = 10701
350352
custom_domains = tunnel1
353+
# route_by_http_user = user1

conf/frps_full.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ vhost_https_port = 443
3030
# HTTP CONNECT requests. By default, this value is 0.
3131
# tcpmux_httpconnect_port = 1337
3232

33+
# If tcpmux_passthrough is true, frps won't do any update on traffic.
34+
# tcpmux_passthrough = false
35+
3336
# set dashboard_addr and dashboard_port to view dashboard of frps
3437
# dashboard_addr's default value is same with bind_addr
3538
# dashboard is available only if dashboard_port is set

conf/systemd/frpc.service

Lines changed: 0 additions & 15 deletions
This file was deleted.

conf/systemd/[email protected]

Lines changed: 0 additions & 15 deletions
This file was deleted.

conf/systemd/frps.service

Lines changed: 0 additions & 14 deletions
This file was deleted.

conf/systemd/[email protected]

Lines changed: 0 additions & 14 deletions
This file was deleted.

dockerfiles/Dockerfile-for-frpc

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
1-
FROM alpine:3 AS temp
1+
FROM golang:1.18 AS building
22

3-
COPY bin/frpc /tmp
4-
5-
RUN chmod -R 777 /tmp/frpc
3+
COPY . /building
4+
WORKDIR /building
65

6+
RUN make frpc
77

88
FROM alpine:3
99

10-
WORKDIR /app
11-
12-
COPY --from=temp /tmp/frpc /usr/bin
10+
COPY --from=building /building/bin/frpc /usr/bin/frpc
1311

1412
ENTRYPOINT ["/usr/bin/frpc"]

dockerfiles/Dockerfile-for-frps

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
1-
FROM alpine:3 AS temp
1+
FROM golang:1.18 AS building
22

3-
COPY bin/frps /tmp
4-
5-
RUN chmod -R 777 /tmp/frps
3+
COPY . /building
4+
WORKDIR /building
65

6+
RUN make frps
77

88
FROM alpine:3
99

10-
WORKDIR /app
11-
12-
COPY --from=temp /tmp/frps /usr/bin
10+
COPY --from=building /building/bin/frps /usr/bin/frps
1311

1412
ENTRYPOINT ["/usr/bin/frps"]

0 commit comments

Comments
 (0)