这样你访问代理服务器的数据库端口就等于访问数据库服务器的对应端口了。
为了更加安全,你还可以在客户端上设置使用非默认的端口访问代理服务器,然后在代理服务器上把你指定的端口映射到数据库服务器的数据库端口。比如在代理服务器上把8000端口映射到服务器1433端口,然后在客户端上配置为使用8000端口来访问数据库。这样你就可以通过代理服务器的8000端口来连接sqlserver数据库了。
另外,也可以不用代理服务器,直接用路由器做端口映射。
i think this should look like..applet
jdbc->lokal server someport
lokal sever someport
get data_for_sqlserver
embed data_for_sqlserver ->post_http_data_for_sqlserver
socket port 80->http://yourwebserver/servlet
send post_http_data_for_sqlserver (use POST)
is this ok for u ?
remote server with servlet
getPost post_http_data_for_sqlserver
unwrap post_http_data_for_sqlserver ->data_for_sqlserver
socket->mysql on right port
send data_for_sqlserver
receive data_from_sqlserver
embed data_from_sqlserver ->http_response_data_from_sqlserver
sendResponse http_response_data_from_sqlserver
lokal server someport
receive http_response_data_from_sqlserver
unwrap http_response_data_from_sqlserver ->data_from_sqlserver
send data_from_sqlserver
applet
jdbc.get data_from_sqlserver ->ResultSet
as you can see this is a lot of work and im not sure if you can open a
serverport in untrusted applets.
so if you can connect to port 80 without a runing webserver you can
write your own jdbc-redirect-proxy
applet
jdbc->your jdbcproxy on port 80
jdbcproxy
get data_to_sqlserver
socket->mysql on right port
send data_to_sqlserver
get response ->data_from_sqlserver
send data_from_sqlserver
applet
jdbc.get data_from_sqlserver ->ResultSet
欢迎分享,转载请注明来源:夏雨云
评论列表(0条)