prax

所属分类:collect
开发工具:Crystal
文件大小:0KB
下载次数:0
上传日期:2023-03-15 23:25:41
上 传 者sh-1993
说明:  用于开发的机架代理服务器(Crystal端口),
(Rack proxy server for development (Crystal port),)

文件列表:
CHANGELOG.md (2547, 2022-02-12)
Gemfile (89, 2022-02-12)
Gemfile.lock (962, 2022-02-12)
LICENSE (21773, 2022-02-12)
Makefile (2301, 2022-02-12)
Rakefile (138, 2022-02-12)
VERSION (8, 2022-02-12)
Vagrantfile (1476, 2022-02-12)
bin/ (0, 2022-02-12)
bin/prax (15, 2022-02-12)
bin/prax-rc (49, 2022-02-12)
ext/ (0, 2022-02-12)
ext/Makefile (456, 2022-02-12)
ext/nss_prax.c (3203, 2022-02-12)
install/ (0, 2022-02-12)
install/debian/ (0, 2022-02-12)
install/debian/initd (452, 2022-02-12)
install/debian/postinst (121, 2022-02-12)
install/debian/postrm (177, 2022-02-12)
install/debian/prerm (118, 2022-02-12)
install/dnsmasq (55, 2022-02-12)
install/prax.desktop (188, 2022-02-12)
libexec/ (0, 2022-02-12)
libexec/prax (596, 2022-02-12)
libexec/prax---version (72, 2022-02-12)
libexec/prax-certificate (1104, 2022-02-12)
libexec/prax-cleanup (303, 2022-02-12)
libexec/prax-commands (936, 2022-02-12)
libexec/prax-help (2069, 2022-02-12)
libexec/prax-iptables (2056, 2022-02-12)
libexec/prax-link (862, 2022-02-12)
libexec/prax-list (323, 2022-02-12)
libexec/prax-log (224, 2022-02-12)
libexec/prax-open (598, 2022-02-12)
libexec/prax-restart (476, 2022-02-12)
libexec/prax-start (194, 2022-02-12)
... ...

# Prax Rack proxy server for development This is an (almost) complete rewrite of [Prax](https://github.com/ysbaddaden/prax) in [Crystal](http://crystal-lang.org), a Ruby-inspired language that compiles down to LLVM. This version should avoid problems with version managers, since Prax is now a binary application that don't rely on Ruby anymore (except for Rack and `rackup`). Please refer to the wiki for more information: - [User Guide](https://github.com/ysbaddaden/prax.cr/wiki/User-Guide) ## Install You can download a Debian / Ubuntu package for 64bits kernel on the [releases page](https://github.com/ysbaddaden/prax.cr/releases). For other systems, you'll have to follow the [Manual Install Guide](https://github.com/ysbaddaden/prax.cr/wiki/Manual-Install-Guide). ## How it works 1. resolves `*.test` and `*.localhost` domains to `127.0.0.1` and `::1` (localhost); 2. redirects the :80 and :443 ports to :20559 and :20558; 3. receives incoming HTTP requests and extracts the hostname (eg: `myapp.test`); 4. serves static files directly if they exist; 4. otherwise spawns a Rack applications (found at `~/.prax/myapp`) if any; 5. and proxies the request to the Rack aplication or a specified port for port forwarding. ## Domain Resolver ### systemd If your distribution uses `systemd-resolved`, just use the `.localhost` TLD instead of `.test` —be prepared to fight against systemd if you want to use another TLD, or consider switching to a systemd free Linux. ### `.test` TLD Prax proposes 2 solutions to resolve `.test` and `.localhost` domains: - a dnsmasq configuration, either throught NetworkManager or by installing dnsmasq manually (eg. through your Linux distribution package); - an obsolete and deprecated NSSwitch extension, only compatible wih glibc and no longer compatible with Google Chrome/Chromium, and certainly more. ### nip.io Prax supports http://nip.io/ domains, so you can use `myapp.129.168.0.1.nip.io` for example. This is useful when using an external device like a smartphone, tablet or another computer to test your websites on. ### Custom TLD If `.test` or `.localhost` domains are not your cup of tea, no problem! Prax will route requests from any TLD to the applications in your `~/.prax` directory, as long as the domain resolves to localhost. For instance, if you wished to visit `myapp.dev` instead of `myapp.test`, you could create dnsmasq configuration to resolve `.dev` domains to localhost, too: ``` $ sudo tee /etc/dnsmasq.d/dev < Prax wouldn't exist without [Pow!!](http://pow.cx) by Sam Stephenson and Basecamp. Prax is nothing more but a reimplementation (in another language) with Linux compatibility in mind.

近期下载者

相关文件


收藏者