frp

FRP代理及其在数据库安全上的实践

混江龙づ霸主 提交于 2019-12-03 09:20:42
1 代理 现如今的互联网世界里,代理服务已经十分常见,它通常作为一个第三方或者说中转站角色替代用户取得信息或者服务。 根据代理对象的不同,代理服务可以分为正向代理和反向代理。 1.1 正向代理 我们通常所说的代理一般都指的是正向代理,正向代理的是客户端或者说访问者。如下图所示,在特定网络环境中,客户端直接访问目标服务器会被限制,如果有另外一台可以直接访问到目标服务器,且客户端也可以访问到这台服务器,那么就可以以这台服务器作为代理服务器向目标服务器发起访问,当目标服务器收到访问请求时,并不会获知访问的真正发起者,只会认为是代理服务器发来的请求,返回的消息也是通过代理服务器发送给客户端。 这整个过程我们可以用一个通俗的例子来类比:我们想要像土豪舅舅借钱,但是土豪舅舅觉得我们太年轻,怕我们借钱胡来就不想借。这时候我们找上了外婆,由外婆去问土豪舅舅借钱,然后我们从外婆手里拿到了钱。在整个借钱过程中,“我”就是这个发起访问的客户端,外婆就是这个正向代理,舅舅就是目标服务器,舅舅并不知道实际上还是我这个外甥在借钱,他只知道钱给了外婆,但是钱还是到了我们手上。 Fiddler、mitmproxy抓包,代理ip网络爬虫等应用就是基于正向代理。 1.2 反向代理 正向代理代理的是客户端,与之相反的反向代理代理的就是服务器端,客户端也并不知道真正访问的服务器时哪一台

Collecting Observables to a List doesn't seem to emit the collection at once

徘徊边缘 提交于 2019-12-03 08:24:32
I'm using RxJava to essentially collect the list of individually emitted Observables and combine them into a list of Observables (essentially sort of the opposite of flatMap). Here's my code: // myEvent.findMemberships() returns an Observable<List<Membership>> myEvent.findMemberships() .flatMap(new Func1<List<Membership>, Observable<User>>() { @Override public Observable<User> call(List<Membership> memberships) { List<User> users = new ArrayList<User>(); for (Membership membership : memberships) { users.add(membership.getUser()); } return Observable.from(users); } }) .toList() .subscribeOn

reactive-banana time delays

偶尔善良 提交于 2019-12-03 07:00:00
I have scoured the documentation of reactive-banana , and I can't find a way to specify explicit time delays. Say, for example, I would like to take an Event t a and shift all of its occurrences 1 second into the future; or get an event that fires 1 second from now (within Moment t ); or anything like that. Are explicit delays representable in reactive-banana? If not, how do users implement, e.g., echoing input delayed by a second? As Ben indicates, this is correct: reactive-banana is no built-in notion of time and delays. The main reason is that it is hard to guarantee that logical time and

How to derive FRP from Directed Acyclic Graphs?

狂风中的少年 提交于 2019-12-03 06:35:54
I am currently researching for my next project. This is in a pre-planning phase so this question is just to get an overview on existing technology. Setup I have a directed acyclic graph (DAG) with multiple inputs and output, think artificial neuronal network for now: The common way to process such a structure is to process the whole network on every (time-)step. I believe that is the method used by frp libraries such as netwire . Now I am in the fortunate position that I have a stream of events that each presents the change in one of the input nodes. The idea is that I probably don't have to

In functional reactive programming, how do you share state between two parts of the application?

六眼飞鱼酱① 提交于 2019-12-03 06:18:35
问题 I have some application architecture where user inputs flow to some automata, which runs in the context of the event stream and directs the user to different part of the application. Each part of the application may run some action based on user inputs. However, two parts of the application is sharing some state and are, conceptually, reading and writing to the same state. The caveat is that the two "threads" are not running at the same time, one of them is "paused" while the other one

Am I using reactive-banana right?

陌路散爱 提交于 2019-12-03 05:04:36
问题 Here's an example Haskell FRP program using the reactive-banana library. I'm only just starting to feel my way with Haskell, and especially haven't quite got my head around what FRP means. I'd really appreciate some critique of the code below {-# LANGUAGE DeriveDataTypeable #-} module Main where {- Example FRP/zeromq app. The idea is that messages come into a zeromq socket in the form "id state". The state is of each id is tracked until it's complete. -} import Control.Monad import Data

Higher order FRP with React - why is it not happening?

匿名 (未验证) 提交于 2019-12-03 02:49:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Redux is a kind of first order FRP, like Elm used to be. It seems however that higher order FRP is not really being used together with react. Why is first order FRP useful with React and higher order not so useful ? Maybe higher-order-ism is not needed with React ? So in return one can keep the time travelling debugger ? In other words: React is a function that takes a state and gives back a view. FRP is a way to declare and execute a state machine. These are orthogonal concerns, so why not combine them ? EDIT: If i compare this https:/

阿里云Centos frp透传配置

匿名 (未验证) 提交于 2019-12-03 00:22:01
下载frp https://github.com/fatedier/frp/releases 下载完成后,将软件上传到阿里云服务器 - 阿里云添加安全策略,开放frp绑定的端口 https://help.aliyun.com/document_detail/25471.html?spm=a2c4g.11186623.4.2.rnoiv9 CentOS系统中使用命令开启端口 Centos7 开启 , 关闭端口 CentOS7 默认没有使用iptables , 所以不能通过编辑 iptables 的配置文件来开启端口 , CentOS7 采用了 firewalld 防火墙 如要查询是否开启3306端口则 : 开启端口 : 重启防火墙 : 关闭端口 : Centos6.X 开启 , 关闭端口 使用 iptables 开放如下端口 : 保存 : # /etc/rc.d/init.d/iptables save 重启服务 : # /etc/rc.d/init.d/iptables restart 查看端口是否开放 : # /etc/init.d/iptables status 关闭端口 : - 配置frp 详见frp文档 - 测试 文章来源: 阿里云Centos frp透传配置

十分钟教你配置frp实现内网穿透

匿名 (未验证) 提交于 2019-12-03 00:03:02
十分钟教你配置frp实现内网穿透 一、frp的作用 利用处于内网或防火墙后的机器,对外网环境提供 http 或 https 服务。 对于 http, https 服务支持基于域名的虚拟主机,支持自定义域名绑定,使多个域名可以共用一个80端口。 利用处于内网或防火墙后的机器,对外网环境提供 tcp 和 udp 服务,例如在家里通过 ssh 访问处于公司内网环境内的主机。 二、配置说明 1、实现功能 (1)外网通过ssh访问内网机器 (2)自定义绑定域名访问内网web服务 2、配置前准备 (1)公网服务器1台 (2)内网服务器1台(我这里演示的是linux环境,win10上面vmware安装的centos7) (3)公网服务器绑定域名1个(实现二1中(1)功能不需要公网服务器绑定域名,二1中(2)功能必须需要公网服务器绑定域名) (4)内网服务器部署一个web服务,可以用tomcat模拟,这里就不演示了 三、安装frp 1、公网服务器与内网服务器都需要下载frp进行安装,公网服务器(服务端)配置关注步骤6,内网服务器(客户端)关注步骤7 2、下载地址是 https://github.com/fatedier/frp/releases ,下载linux版本frp_0.13.0_linux_amd64.tar.gz,个人感觉下载速度有点慢, 也可以这样选择下载wget https:/

使用frp+Gitlab实现外网访问gitlab以及外网环境下git clone

匿名 (未验证) 提交于 2019-12-02 23:34:01
使用frp+Gitlab实现外网访问gitlab以及外网环境下git clone 前期准备工作 Gitlab环境搭建 frp工具介绍 主要配置过程 前期准备工作 一台内网主机(一般是一台centos系统的主机,用来搭建Gitlab) 一台外网服务器(系统无所谓,作用只是提供外网IP,不然在外网环境下去哪访问) Gitlab环境搭建 搭建教程网上很多也没啥难度,在此就不详细介绍了。 需要解决的问题: 环境搭建完成后,使用本机ip+端口能够实现gitlab的访问及git clone等命令。这些操作在内网环境下使用没有任何问题,但想要外网访问,就没辙了,此篇主要解决就是在外网环境下实现这些操作 frp工具介绍 很简单的一个内网穿透工具,也没啥难度网上多冲浪很容易解决。主要说一下作用:此工具实现将内网服务器下的一个端口转到外网(公网IP)下一个端口,简单理解就是端口绑定,能够将内网主机(或理解为内网ip)中的端口和外网主机(外网ip)中的端口实现一一对应 简单示例: 配置如下:内网主机(客户端):192.168.10.18:22 外网主机(服务端):104.224.189.134:7008 frp工具运行后,访问外网104.224.189.134:7008端口等价于访问192.168.10.18:22 104.224.189.134:7008 == 192.168.10.18:22