问题标签 [proxies]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
proxy - Doctrine Mongodb ODM 持久化并刷新代理文档
我想知道是否可以持久化和刷新代理文档。
如果我们克隆一个代理文档(不要忘记实现一个 __clone 方法来重置 id 参数)并持久化并刷新它是否会被插入?
如果我们想要文件的副本,可能会发生这种情况。
示例文档:
用法:
这可能是一个不好的例子,但这只是为了知道这是否可能。
编辑:对于那些想要做类似事情的人,它不能直接工作,但你可以通过使用“onFlush”事件来强制它
php - 通过 fsockopen 使用代理
我有一个要添加代理的 Pagerank 检查脚本。我通常使用 Curl,所以我不确定如何通过代理发出请求。我希望请求从 $proxies 数组中选择一个随机代理并将其用于请求。谁能告诉我如何使用此脚本完成此操作。提前致谢。
javascript - JavaScript 中的动态服务定位器?
我正在尝试使用 Harmony Proxies (Node.js) 用 JavaScript 编写动态服务定位器。基本上你会创建一个新容器:
然后,您将能够像传统的服务定位器一样设置和获取值:
你甚至可以拥有像子对象一样的命名空间:
问题在于动态别名。
创建别名时,它会创建一个新的代理对象,您可以在其中像传统对象一样操作它,但它是get()
和set()
方法的别名。
代替:
使用别名,您将使用:
问题在于深层命名空间。假设您正在尝试访问App.Hello.World.Controller
,因为它一次通过代理一个名称空间,而不是一次全部(就像那个完整的名称空间)。我如何知道用户是否正在调用App.Hello
以检索存储在服务定位器中的值,或者用户是否想继续访问更深的命名空间?你不能(根据我的尝试)。
你还有什么其他方法可以做到这一点?
App.Hello.World
如果要访问更深的名称空间,则具有将返回代理或存储在服务定位器中的值的语法。
现在,我已经制定了处理这两个选项的约定。您将使用单数名称来检索值和复数来返回代理。这只是一个快速的“破解”,因为它不是很有效。
(如果您需要澄清或更多信息,请告诉我)
haskell - 在基本单子中将代理与不同的 EitherT 组合起来
例如,拥有...
...我如何使这项工作?
注意:我读过Mixing Base Monads in Control.Proxy.Tutorial
。我得到了第一个示例,但无法理解人为的示例。更多的例子,不是那么明显但不是那么做作,可能会阐明如何使用hoist
和lift
匹配基本单子的任何组合。
python - Python - make script loop until condition met and use a different proxy address for each loop
I'm the definition of a noob. I know next to nothing about python and am looking for help. I can read just enough code to alter variables to suit my wants/needs but I when it comes to doing something the original code didn't call for... I'm lost.
So here is the deal, I found a craigslist(CL) flagging script that originally searched ALL CL sites and flagged posts that contained a specific keyword (it was written to flag all posts that mentioned scientology).
I altered it to only search CL sites in my general area (15 sites instead of 437) but it still looks for specific keywords that have have changed. I want to automatically flag people that continuously spam CL and make it hard to sort through as I do a lot of business on CL from sorting through postings.
What I want the script to do is loop until it can no longer find posts that meet the criteria changing proxy servers after each loop. And a place inside the script where I would put in the proxy/s ip adress
I look forward to your replies.
Here is the altered code I have:
vb.net - 是否可以通过匿名代理使用 UdpClient?
我正在向 UDP 主机发送一个大端字节数组,一切正常,但我需要将代理合并到混合中。
从我发现(或尚未发现)的情况来看,没有直接的方法可以将匿名代理(甚至 Socks4/5)与 UdpClient 一起使用。任何人都可以帮忙吗?
spring - 使用 Cobertura 时 Spring 自动装配失败
当我运行 Cobertura 时,它会导致以下 Spring 自动装配错误:
原因:org.springframework.beans.factory.BeanCreationException:创建名为“userResource”的bean时出错:注入自动装配的依赖项失败;嵌套异常是 org.springframework.beans.factory.BeanCreationException:无法自动装配字段:私有 com.dnb.components.storage.service.UserService com.dnb.components.storage.rest.resource.UserResource.userService;嵌套异常是 java.lang.IllegalArgumentException: Can not set com.dnb.components.storage.service.UserService field com.dnb.components.storage.rest.resource.UserResource.userService to com.sun.proxy.$Proxy56 at org .springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:287)
正如其他相关帖子中所建议的那样,我尝试通过更改“proxyTargetClass = true”来强制 Spring 使用 CGLIB,但这会导致不同的错误:
原因:org.springframework.beans.factory.BeanCreationException:创建名为“userResource”的bean时出错:注入自动装配的依赖项失败;嵌套异常是 org.springframework.beans.factory.BeanCreationException:无法自动装配字段:私有 com.dnb.components.storage.service.UserService com.dnb.components.storage.rest.resource.UserResource.userService;嵌套异常是 org.springframework.beans.factory.BeanCreationException:创建名为“userService”的 bean 时出错:注入自动装配的依赖项失败;嵌套异常是 org.springframework.beans.factory.BeanCreationException:无法自动装配字段:com.dnb.components.storage.repository.UserRepository com.dnb.components.storage.service.UserService.repository;嵌套异常是 org.springframework.beans.factory.BeanCreationException:创建名为“userRepository”的 bean 时出错:FactoryBean 对象的后处理失败;嵌套异常是 org.springframework.aop.framework.AopConfigException:无法生成类 [class com.sun.proxy.$Proxy54] 的 CGLIB 子类:此问题的常见原因包括使用最终类或不可见类;嵌套异常是 java.lang.IllegalArgumentException: Cannot subclass final class class com.sun.proxy.$Proxy54
这是 Repository 类的样子:
这是使用 UserRepository 注入的服务:
我们的配置在
(为简洁省略)
用户资源.java:
...
似乎 Spring Data JPA 生成的 Repository 类不能以任何一种方式代理,而不会搞砸自动装配。
有解决办法吗?使用 @Transactional 注释存储库方法甚至是一个好主意吗?注释是否应该仅在服务级别?
networking - 如何检测收到的网络超时是由于请求端点还是中间的东西(例如 http 代理)
作为编写爬虫的一部分(在 Node.js 中,但实际上不是重点),我有时会收到超时和其他网络异常。某些异常(如 http 错误代码)可以正确归因于目标请求端点。其他的,比如我自己配置的超时,更难(不可能?)归因。
例如,在使用 http 代理进行爬网时,如何检查异常(如提到的超时)是由于代理还是由于请求端点引起的?
c# - C# TcpClient.Connect 通过代理
我一直在寻找高低试图弄清楚这一点,但到目前为止我所看到的一切,人们只是告诉我使用其他方法。
顺便说一句,我的问题是我正在尝试使用 socks 5 代理通过 TcpClient 连接到服务器
我目前的设置是:
我不确定我是否错过了任何信息,所以如果我有,我会很乐意更新这个。
php - 将代理与 cURL 一起使用?
我有这个问题,我需要每 200 个 cURL 请求更改我的 IP - 所以很明显代理会浮现在脑海中。问题是我想知道如何在哪里找到这些代理。有什么解决办法吗?谢谢!
更新:好的,因此对于本网站的未来访问者,如果您想通过随机代理使用 cURL,您可以这样做:1)您必须从代理网站上刮取随机代理(以这个为例:http://www.hidemyass.com/proxy-list/10 ) ...将代理保存到变量 2) 然后您将使用以下代码通过代理连接到站点: