public abstract class RadiusProxy extends RadiusServer
| 构造器和说明 |
|---|
RadiusProxy() |
| 限定符和类型 | 方法和说明 |
|---|---|
int |
getProxyPort()
Returns the proxy port this server listens to.
|
abstract RadiusEndpoint |
getProxyServer(RadiusPacket packet,
RadiusEndpoint client)
This method must be implemented to return a RadiusEndpoint
if the given packet is to be proxied.
|
protected DatagramSocket |
getProxySocket()
Returns a socket bound to the proxy port.
|
protected RadiusPacket |
handlePacket(InetSocketAddress localAddress,
InetSocketAddress remoteAddress,
RadiusPacket request,
String sharedSecret)
Handles packets coming in on the proxy port.
|
protected void |
proxyPacket(RadiusPacket packet,
RadiusProxyConnection proxyConnection)
Proxies the given packet to the server given in the proxy connection.
|
protected void |
proxyPacketReceived(RadiusPacket packet,
InetSocketAddress remote)
Sends an answer to a proxied packet back to the original host.
|
void |
setProxyPort(int proxyPort)
Sets the proxy port this server listens to.
|
void |
setSocketTimeout(int socketTimeout)
Sets the socket timeout.
|
void |
start(boolean listenAuth,
boolean listenAcct,
boolean listenProxy)
Starts the Radius proxy.
|
void |
stop()
Stops the proxy and closes the socket.
|
accessRequestReceived, accountingRequestReceived, copyProxyState, getAcctPort, getAcctSocket, getAuthPort, getAuthSocket, getDuplicateInterval, getListenAddress, getSharedSecret, getSocketTimeout, getUserPassword, isPacketDuplicate, listen, listenAcct, listenAuth, makeDatagramPacket, makeRadiusPacket, setAcctPort, setAuthPort, setDuplicateInterval, setListenAddress, startpublic void start(boolean listenAuth,
boolean listenAcct,
boolean listenProxy)
public void stop()
stop 在类中 RadiusServerpublic abstract RadiusEndpoint getProxyServer(RadiusPacket packet, RadiusEndpoint client)
packet - the packet in questionclient - the client endpoint the packet originated from
(containing the address, port number and shared secret)public int getProxyPort()
public void setProxyPort(int proxyPort)
proxyPort - proxy portpublic void setSocketTimeout(int socketTimeout)
throws SocketException
setSocketTimeout 在类中 RadiusServersocketTimeout - socket timeout, >0 msSocketExceptionprotected DatagramSocket getProxySocket() throws SocketException
SocketExceptionprotected RadiusPacket handlePacket(InetSocketAddress localAddress, InetSocketAddress remoteAddress, RadiusPacket request, String sharedSecret) throws RadiusException, IOException
handlePacket 在类中 RadiusServerlocalAddress - local address the packet was received onremoteAddress - remote address the packet was sent byrequest - the packetRadiusExceptionIOExceptionprotected void proxyPacketReceived(RadiusPacket packet, InetSocketAddress remote) throws IOException, RadiusException
packet - packet to be sent backremote - the server the packet arrived fromIOExceptionRadiusExceptionprotected void proxyPacket(RadiusPacket packet, RadiusProxyConnection proxyConnection) throws IOException
packet - the packet to proxyproxyCon - the RadiusProxyConnection for this packetIOExceptionCopyright © 2016. All rights reserved.