Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #40018
| Newsgroups | comp.lang.java.programmer |
|---|---|
| Date | 2023-10-11 20:31 -0700 |
| References | (2 earlier) <op.usleizay8jd0ej@macbook-pro.local> <op.usle8gxp8jd0ej@macbook-pro.local> <49ea90ba$0$23287$9b622d9e@news.freenet.de> <op.usl8jyhr8jd0ej@macbook-pro.local> <49ecb5de$0$23271$9b622d9e@news.freenet.de> |
| Message-ID | <7603edb8-252a-43e1-b4a3-b864ce4cffban@googlegroups.com> (permalink) |
| Subject | Re: Socks + NIO possible? |
| From | weiqi fan <sherlockffff@gmail.com> |
在 2009年4月21日星期二 UTC+8 01:50:06,<Christian> 写道: > Peter Duniho schrieb: > > On Sat, 18 Apr 2009 19:47:08 -0700, Christian <fake...@xyz.de> wrote: > > > >> [...] > >> My hope was that there was sort of an alike way to handle Proxys > >> without having to change all code where SocketChannels are in use. > >> > >> There just is no .connect() method for socketChannel that allows for a > >> proxy.. > > > > Well, I admit I haven't used it. But as I mentioned, it appears to me > > that you can use the ProxySelector class (or more specifically, your own > > implementation of the class) to globally direct all Socket i/o to use a > > particular proxy server. > > > > I agree that the restriction on SocketChannel, where (as the docs say) > > "It is not possible to create a channel for an arbitrary, pre-existing > > socket", means you can't construct a Socket to use a specific proxy. > > But as long as you can deal with setting it on a global basis (at least > > temporarily, while you create the SocketChannel you need), it seems like > > it would work. > > > > Pete > Problem I have is: SocketChannel seems to ignore global settings. > It just doesn't work here. > Christian Have you resolved this problem?
Back to comp.lang.java.programmer | Previous | Next | Find similar | Unroll thread
Re: Socks + NIO possible? weiqi fan <sherlockffff@gmail.com> - 2023-10-11 20:31 -0700
csiph-web