oracle 通过socks代理连接oracle
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3020809/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
connect to oracle through socks proxy
提问by Roman
My application (linux and windows) connects to oracle through OCI interface. Is it possible to connect to oracle through socks proxy? or some other similar proxy method? Simple ssh tunnel is not enough as I need to access multiple services (including oracle) through single port.
我的应用程序(linux 和 windows)通过 OCI 接口连接到 oracle。是否可以通过socks代理连接到oracle?或其他一些类似的代理方法?简单的 ssh 隧道是不够的,因为我需要通过单个端口访问多个服务(包括 oracle)。
Edit: I have tried configuring the proxy as suggested in the answer, but it did not work. And I could not find anywhere information, that oracle can work through socks5 proxy.
编辑:我尝试按照答案中的建议配置代理,但没有奏效。而且我找不到任何信息,那个oracle可以通过socks5代理工作。
回答by Christian
I got the same issue to get solved. Anyway the solution above cannot work. You need to tell the client to just USE the proxy for connection initialization, but the target to connect to is supposed to be the oracle database server IP and port. Other forums read there is no such possibility via tnsnames.ora. But you're supposed to be able to achieve that using the Connection Manager. Haven't found out yet how to even download and install it though...
我遇到了同样的问题需要解决。无论如何,上述解决方案不起作用。您需要告诉客户端只使用代理进行连接初始化,但连接的目标应该是 oracle 数据库服务器 IP 和端口。其他论坛通过 tnsnames.ora 读到没有这种可能性。但是您应该能够使用连接管理器来实现这一点。还没有找到如何下载和安装它虽然...
回答by cgi
As I see Oracle doesn't support socks proxy.
正如我所见,Oracle 不支持袜子代理。
To work around this for my self I did following:
为了解决这个问题,我做了以下工作:
- Install proxifier www.freecap.ru
- Start PL/SQL Developer from freecap
- 安装 proxifier www.freecap.ru
- 从 freecap 启动 PL/SQL Developer
As I can see - this method not always work. PL/SQL Developer was able to connect to database only on 3-4 try. But after successful connect - it's seems stable enough for work.
正如我所看到的 - 这种方法并不总是有效。PL/SQL Developer 只能尝试 3-4 次才能连接到数据库。但是在成功连接后 - 它似乎足够稳定,可以工作。
Second option - is to use Java based tools like SQL Developer. For Java there is system options for using SOCKS5 out of the box. -DsocksProxyHost=localhost -DsocksProxyPort=8081
第二种选择 - 是使用基于 Java 的工具,如 SQL Developer。对于 Java,有开箱即用的使用 SOCKS5 的系统选项。-DsocksProxyHost=localhost -DsocksProxyPort=8081
there is official doc about SOCKS in java
java中有关于SOCKS的官方文档
回答by dpbradley
Yes, this is possible. Your client tnsnames.ora file (or EZConnect string) should specify the proxy host as the database host, and the proxy listening port as the port. The SERVICE_NAME or SID is whatever the SQL*Net listener on the other side of the proxy is expecting.
是的,这是可能的。您的客户端 tnsnames.ora 文件(或 EZConnect 字符串)应将代理主机指定为数据库主机,将代理侦听端口指定为端口。SERVICE_NAME 或 SID 是代理另一端的 SQL*Net 侦听器所期望的。
[Edit] If your proxy host is listening and forwarding on 1522, you should be able to:
[编辑] 如果您的代理主机在 1522 上侦听和转发,您应该能够:
telnet proxyhost 1522
and see:
并看到:
Trying xx.xxx.xx.xxx...
Connected to proxyhost.domain.
Escape character is '^]'.