frp

nginx + frp 搭建内网穿透

点点圈 提交于 2019-12-13 23:09:19
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 上一个项目是开发微信公众号,由于微信的各种烦人操作,只能到处找内网映射工具 ngrok也用过,花生壳也用过 都不怎么稳定,无意间听说了frp,本着一颗折腾的心搭建了一下,结果发现很不错,就一直到项目结束,发现还是很好用的,不过当时搭建的只能一个人用,(搭建ngrok又很麻烦 试了几次都有问题 !!很无奈),这会趁着用不到,尝试搭了下可以多人使用的!记录如下 所需工具 1. 云服务器 我用的阿里云CentOs7.7 2. 域名(已备案的那种) 3. nginx 1.16.1 4. frp 0.30 参考资料: https://juejin.im/post/5c49313f6fb9a049eb3c488f https://www.wlphp.com/?post=166 https://blog.csdn.net/MaxWoods/article/details/89501907 开始操作: 1. 先安装nginx 我用的yum安装,主要是我感觉这个方便 yum install -y nginx 等待完成 2. 启动Nginx并设置开机启动 systemctl start nginx systemctl enable nginx 3. 验证Nginx是否启动 ps -ef | grep -v grep | grep

Functional Banana Traveller - putting together Behavior t GameState

被刻印的时光 ゝ 提交于 2019-12-12 18:11:47
问题 The problem is that I do not know how to create the Behavior of type Behavior t GameState I have more code, but am trying to just show what I think is neccessary to talk about the problem. Let me know if there are blanks to be filled in. Here's what I have : data GameState = GameState {agent :: Agent ,universe :: Universe } type Universe = Gr Planet () data Command = Move PlanetName | Look | Quit deriving Show data PlayerCommand = PlayerCommand Command PID | Null deriving Show updateGS ::

Dynamic event switching in reactive-banana causes severe leak

巧了我就是萌 提交于 2019-12-12 12:26:40
问题 I'm not sure whether this behavior is expected (i.e. I'm misusing Reactive.Banana.Switch) or a bug. Let's say I have two like-typed input Behaviors, and I want to switch between them based on an Event. I wrote this function: switchBehaviors :: Behavior t a -- | Behavior to yield initially and after "True" events -> Behavior t a -- | Behavior to yield after "False" events -> Event t Bool -- | Select between behaviors -> Moment t (Behavior t a) switchBehaviors t f es = do t' <- trimB t f' <-

Getting input into Netwire programs

若如初见. 提交于 2019-12-12 08:23:52
问题 I'm getting started with Netwire version 5. I have no problem writing all the wires I want to transform my inputs into my outputs. Now the time has come to write the IO wrapper to tie in my real-world inputs, and I am a bit confused. Am I supposed to create a custom session type for the s parameter of Wire s e m a b and embed my sensor values in there? If so, I have these questions: What's up with the Monoid s context of class (Monoid s, Real t) => HasTime t s | s -> t ? What is it used for?

Is Date.now referential transparent?

久未见 提交于 2019-12-12 07:13:59
问题 DateTime.Now or Date.now is referential transparent? This is one of the controversial topic in a functional programming article in Qiita. First of all, we must be very careful since the word "referential transparent" is tricky word/concept in a sense, and a prominent discussion exists in What is referential transparency? The questioner states: What does the term referential transparency mean? I've heard it described as "it means you can replace equals with equals" but this seems like an

frp 配置

偶尔善良 提交于 2019-12-12 00:16:51
前言 对于没有公网 IP 的内网用户来说,远程管理或在外网访问内网机器上的服务是一个问题。 今天给大家介绍一款好用内网穿透工具 FRP,FRP 全名:Fast Reverse Proxy。FRP 是一个使用 Go 语言开发的高性能的反向代理应用,可以帮助您轻松地进行内网穿透,对外网提供服务。FRP 支持 TCP、UDP、HTTP、HTTPS等协议类型,并且支持 Web 服务根据域名进行路由转发。 FRP 的作用 利用处于内网或防火墙后的机器,对外网环境提供 HTTP 或 HTTPS 服务。 对于 HTTP, HTTPS 服务支持基于域名的虚拟主机,支持自定义域名绑定,使多个域名可以共用一个 80 端口。 利用处于内网或防火墙后的机器,对外网环境提供 TCP 和 UDP 服务,例如在家里通过 SSH 访问处于公司内网环境内的主机。    FRP 安装   FRP 采用 Go 语言开发,支持 Windows、Linux、MacOS、ARM等多平台部署。FRP 安装非常容易,只需下载对应系统平台的软件包,并解压就可用。   这里以 Linux 为例,为了方便管理我们把解压后的目录重命名为 frp :   $ wget https://github.com/fatedier/frp/releases/download/v0.30.0/frp_0.30.0_linux_amd64.tar

bacon.js - Ignoring certain values in a stream

谁都会走 提交于 2019-12-11 18:42:40
问题 Assuming the following code (current state can be viewed here ): function scrollTopFromEvent(evt) { return $(evt.target).scrollTop(); } function scrollDirection(evt) { return -evt.originalEvent.wheelDelta / 120 || evt.originalEvent.detail / 3; } function pageNumber(previous, next) { return previous + next; } function scrollToPage(pageNumber) { var container = $('.parallax'); TweenLite.to(container, 1, { scrollTop: container.height() * (pageNumber) }); } function inRange(pageNumber) { var

什么是(功能)反应式编程?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 17:29:50
我已经读过关于 反应式编程 的维基百科文章。 我还阅读了关于 功能反应式编程 的小文章。 描述非常抽象。 功能反应式编程( FRP )在实践中意味着什么? 反应式编程(与非反应式编程相反?)由什么组成? 我的背景是命令式/ OO语言,因此可以理解与此范例相关的解释。 #1楼 好的,从背景知识和阅读您指向的维基百科页面,似乎反应式编程就像数据流计算,但具有特定的外部“刺激”触发一组节点触发并执行其计算。 这非常适合于UI设计,例如,触摸用户界面控件(例如,音乐播放应用程序上的音量控制)可能需要更新各种显示项目和音频输出的实际音量。 当你修改音量(一个滑块,比方说)时,它对应于修改与有向图中节点相关的值。 具有来自该“音量值”节点的边缘的各种节点将被自动触发,并且任何必要的计算和更新将自然地波及整个应用程序。 应用程序“响应”用户刺激。 功能性反应式编程只是在功能语言中实现这一思想,或者通常在函数式编程范例内实现。 有关“数据流计算”的更多信息,请在维基百科上搜索这两个单词或使用您最喜欢的搜索引擎。 一般的想法是这样的:程序是节点的有向图,每个节点执行一些简单的计算。 这些节点通过图形链接相互连接,图形链接将某些节点的输出提供给其他节点的输入。 当节点触发或执行其计算时,连接到其输出的节点将其相应的输入“触发”或“标记”。 触发/标记/可用的所有输入的任何节点都会自动触发。

RxJS groupBy and combineAll operators seem to omit output

不打扰是莪最后的温柔 提交于 2019-12-11 13:56:11
问题 When grouping output with the combination of .groupBy and .concatAll, some expected output is not generated. Sample code: var Rx = require('rx'); var source = Rx.Observable.from(['a1', 'a2', 'b1', 'b2', 'a3', 'a4', 'b3', 'b4']) .groupBy(function (item) { return item.substr(0, 1); }) .concatAll(); var subscription = source.subscribe( function (x) { console.log('Next: %s', x); }, function (err) { console.log('Error: %s', err); }, function () { console.log('Completed'); }); Actual output: $ node

rx.js how to chain observables

*爱你&永不变心* 提交于 2019-12-11 02:14:08
问题 I have an observable that is pulling events off of a server, filtering events for the application type, then subscribing and dispatching the event to one or more handlers to handle. The handlers then go off and do some async update to the db, and I find that the observable will crank out events so fast that the updates are stepping on each other. Which I should have expected. So I think I need my handlers to each employ it's own observable to act as a queue which will handle one event and