Files
chromebrew/packages/frp.rb
Ed Reel 973145c07d Update all no_compile_needed packages (#11896)
Acquia_cli 2.41.0 => 2.41.1

Act 0.2.76 => 0.2.77

Appflowy 0.8.9 => 0.9.1

Btop 1.4.0 => 1.4.3

Bun 1.2.10 => 1.2.13

Cpu_x 5.2.0 => 5.3.0

Crystal 1.16.1 => 1.16.2

Dbeaver 25.0.2 => 25.0.4

Frp 0.62.0 => 0.62.1

Fzf 0.61.1 => 0.61.2

Github_cli 2.70.0 => 2.72.0

Glab 1.55.0 => 1.57.0

Go 1.24.2 => 1.24.3

Gradle 8.13 => 8.14.0

Joplin 3.3.5 => 3.3.12

Nocodb 0.260.5 => 0.263.1

Nushell 0.103.0 => 0.104.0

Nvm 0.40.2 => 0.40.3

Ollama 0.6.5 => 0.6.8

Openjdk17 17.0.14 => 17.0.15

Rclone 1.69.1 => 1.69.2

Rustdesk 1.3.9 => 1.4.0

Shrinkpdf 1.1 => 1.2

Starship 1.22.1 => 1.23.0

Terminus 3.6.2 => 4.0.0

Vscodium 1.99.32562 => 1.100.03093

Zed 0.182.11 => 0.185.15
2025-05-11 13:04:32 +00:00

50 lines
1.7 KiB
Ruby

require 'package'
class Frp < Package
description 'A fast reverse proxy'
homepage 'https://github.com/fatedier/frp'
version '0.62.1'
license 'Apache-2.0'
compatibility 'aarch64 armv7l x86_64'
source_url({
aarch64: "https://github.com/fatedier/frp/releases/download/v#{version}/frp_#{version}_linux_arm.tar.gz",
armv7l: "https://github.com/fatedier/frp/releases/download/v#{version}/frp_#{version}_linux_arm.tar.gz",
x86_64: "https://github.com/fatedier/frp/releases/download/v#{version}/frp_#{version}_linux_amd64.tar.gz"
})
source_sha256({
aarch64: 'ba2fe44e2e63a3692658f63474e5a450b7109cc55ab863a2af6834f728a770d5',
armv7l: 'ba2fe44e2e63a3692658f63474e5a450b7109cc55ab863a2af6834f728a770d5',
x86_64: 'dcf1c62e5862543b6686a8e4c2f430ef636ac33306167f377e7272875020c4d3'
})
no_compile_needed
def self.build
File.write 'frpc.sh', <<~EOF
#!/bin/bash
#{CREW_PREFIX}/share/frp/frpc -c #{CREW_PREFIX}/share/frp/frpc.toml "$@"
EOF
File.write 'frps.sh', <<~EOF
#!/bin/bash
#{CREW_PREFIX}/share/frp/frps -c #{CREW_PREFIX}/share/frp/frps.toml "$@"
EOF
end
def self.install
FileUtils.install 'frpc.sh', "#{CREW_DEST_PREFIX}/bin/frpc", mode: 0o755
FileUtils.install 'frps.sh', "#{CREW_DEST_PREFIX}/bin/frps", mode: 0o755
FileUtils.rm Dir['*.sh']
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/share/frp"
FileUtils.mv Dir['*'], "#{CREW_DEST_PREFIX}/share/frp"
end
def self.postinstall
ExitMessage.add <<~EOM
Type 'frps &' to start the server and run in the background.
Type 'frpc &' to start the client on another machine.
For more information, see https://github.com/fatedier/frp.
EOM
end
end