[GH-ISSUE #4376] [Feature Request] Mac 客户端安装包开启frpc和使用docker开启 注意事项 #3456

Closed
opened 2026-05-05 14:13:25 -06:00 by gitea-mirror · 5 comments
Owner

Originally created by @gexin1 on GitHub (Aug 10, 2024).
Original GitHub issue: https://github.com/fatedier/frp/issues/4376

Describe the feature request

Mac 客户端开启frpc注意事项

  1. 首先要开启ssh登录
    截屏2024-08-11 01 11 01
  2. 然后按照官网配置就可以了
    https://gofrp.org/zh-cn/docs/examples/ssh

Mac使用docker安装客户端注意

  1. 个人使用的是snowdreamtech/frps 由于Mac 不支持
 --network host

所以我们无法在和宿主机器网络互通
要手动打开端口

services:
  frpc:
    image: snowdreamtech/frpc:0.59
    container_name: frpc
    restart: always
    # network_mode: host #不支持
    ports:
      - "8080: 8080"
    volumes:
      - /path/to/frpc.toml:/etc/frp/frpc.toml

2.ssh服务22端口被占用 我们使用host.docker.internal来访问宿主机器
注意web地址服务要设置为0.0.0.0来接受所有地址的请求

webServer.addr = "0.0.0.0"
webServer.port = 8080
webServer.user = ""
webServer.password = ""

[[proxies]]
name = "ssh"
type = "tcp"
localIP = "host.docker.internal"
localPort = 22
remotePort = 7000

Describe alternatives you've considered

No response

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @gexin1 on GitHub (Aug 10, 2024). Original GitHub issue: https://github.com/fatedier/frp/issues/4376 ### Describe the feature request ### Mac 客户端开启frpc注意事项 1. 首先要开启ssh登录 ![截屏2024-08-11 01 11 01](https://github.com/user-attachments/assets/95488166-db1f-4980-bb59-8e2f09503719) 2. 然后按照官网配置就可以了 [https://gofrp.org/zh-cn/docs/examples/ssh](https://gofrp.org/zh-cn/docs/examples/ssh/) ### Mac使用docker安装客户端注意 1. 个人使用的是snowdreamtech/frps 由于Mac 不支持 ```shell --network host ``` 所以我们无法在和宿主机器网络互通 要手动打开端口 ```yml services: frpc: image: snowdreamtech/frpc:0.59 container_name: frpc restart: always # network_mode: host #不支持 ports: - "8080: 8080" volumes: - /path/to/frpc.toml:/etc/frp/frpc.toml ``` 2.ssh服务22端口被占用 我们使用**host.docker.internal**来访问宿主机器 注意web地址服务要设置为**0.0.0.0**来接受所有地址的请求 ```toml webServer.addr = "0.0.0.0" webServer.port = 8080 webServer.user = "" webServer.password = "" [[proxies]] name = "ssh" type = "tcp" localIP = "host.docker.internal" localPort = 22 remotePort = 7000 ``` ### Describe alternatives you've considered _No response_ ### Affected area - [X] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
gitea-mirror 2026-05-05 14:13:25 -06:00
Author
Owner

@wuai1024 commented on GitHub (Aug 12, 2024):

不推荐这样使用,在mac中使用 frpc 请使用 brew ,这个是原生直接运行的,没必要用docker走一层虚拟机。

brew install frpc
<!-- gh-comment-id:2283176752 --> @wuai1024 commented on GitHub (Aug 12, 2024): 不推荐这样使用,在`mac`中使用 frpc 请使用 brew ,这个是原生直接运行的,没必要用docker走一层虚拟机。 ```bash brew install frpc ```
Author
Owner

@gexin1 commented on GitHub (Aug 12, 2024):

不推荐这样使用,在mac中使用 frpc 请使用 brew ,这个是原生直接运行的,没必要用docker走一层虚拟机。

brew install frpc

确实是使用brew 方便一点,还可以使用 brew services 来守护进程

<!-- gh-comment-id:2283191041 --> @gexin1 commented on GitHub (Aug 12, 2024): > 不推荐这样使用,在`mac`中使用 frpc 请使用 brew ,这个是原生直接运行的,没必要用docker走一层虚拟机。 > > ```shell > brew install frpc > ``` 确实是使用`brew` 方便一点,还可以使用 `brew services` 来守护进程
Author
Owner

@CharlesCCC commented on GitHub (Nov 21, 2024):

不推荐这样使用,在mac中使用 frpc 请使用 brew ,这个是原生直接运行的,没必要用docker走一层虚拟机。

brew install frpc

确实是使用brew 方便一点,还可以使用 brew services 来守护进程

国内brew感觉特别慢. 有什么提速的方法吗?

<!-- gh-comment-id:2492016856 --> @CharlesCCC commented on GitHub (Nov 21, 2024): > > 不推荐这样使用,在`mac`中使用 frpc 请使用 brew ,这个是原生直接运行的,没必要用docker走一层虚拟机。 > > ```shell > > brew install frpc > > ``` > > 确实是使用`brew` 方便一点,还可以使用 `brew services` 来守护进程 国内brew感觉特别慢. 有什么提速的方法吗?
Author
Owner

@persiliao commented on GitHub (Nov 28, 2024):

不推荐这样使用,在mac中使用 frpc 请使用 brew ,这个是原生直接运行的,没必要用docker走一层虚拟机。

brew install frpc

确实是使用brew 方便一点,还可以使用 brew services 来守护进程

国内brew感觉特别慢. 有什么提速的方法吗?

使用清华大学的镜像源,就很快了

<!-- gh-comment-id:2506242779 --> @persiliao commented on GitHub (Nov 28, 2024): > > > 不推荐这样使用,在`mac`中使用 frpc 请使用 brew ,这个是原生直接运行的,没必要用docker走一层虚拟机。 > > > ```shell > > > brew install frpc > > > ``` > > > > > > 确实是使用`brew` 方便一点,还可以使用 `brew services` 来守护进程 > > 国内brew感觉特别慢. 有什么提速的方法吗? 使用清华大学的镜像源,就很快了
Author
Owner

@github-actions[bot] commented on GitHub (Dec 20, 2024):

Issues go stale after 14d of inactivity. Stale issues rot after an additional 3d of inactivity and eventually close.

<!-- gh-comment-id:2556019823 --> @github-actions[bot] commented on GitHub (Dec 20, 2024): Issues go stale after 14d of inactivity. Stale issues rot after an additional 3d of inactivity and eventually close.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/frp#3456
No description provided.