Dmi*_*tov 5 ruby proxy http jruby jrubyonrails
我想从JRuby上运行的Rails代码发出HTTP请求.
我怎样才能重新使用http.proxyHost,http.proxyPort和http.nonProxyHosts设置,给JVM运行它?
要通过 JRuby 传递 JVM 标志,请使用-J.... 在这种情况下:
jruby -J-Dhttp.proxyHost=foo -J-Dhttp.proxyPort=1234 -J-Dhttp.nonProxyHosts="*.bar.com" ...
Run Code Online (Sandbox Code Playgroud)
JRuby 的帮助文本对此进行了解释。
-J[java option] pass an option on to the JVM (e.g. -J-Xmx512m)
use --properties to list JRuby properties
run 'java -help' for a list of other Java options
Run Code Online (Sandbox Code Playgroud)