📄 tunnel.java
字号:
/*
* SSL-Explorer
*
* Copyright (C) 2003-2006 3SP LTD. All Rights Reserved
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
package com.sslexplorer.vpn.util;
/**
* @author Brett Smith
* @version $Revision: 1.5 $
*
* The attributes of a port forwarding tunnel
*/
public interface Tunnel {
public final static int LOCAL_TUNNEL = 0;
public final static int REMOTE_TUNNEL = 1;
public final static String TCP_TUNNEL = "TCP";
public final static String UDP_TUNNEL = "UDP";
/*
* Is this a permanent tunnel?
*
* @return permanent
*/
public boolean isPermanent();
public String getTicket();
public void setTicket(String ticket);
public String getName();
/*
* Is this a non permanent tunnel, should we only allow one connection then
* exit?
*
* @return temporary single connection
*/
public boolean isTemporarySingleConnect();
/**
* Force use of 127.0.0.2 rather than 127.0.0.1
* @return
*/
public boolean isLocalhostWorkaround();
/**
* The unique tunnel id
*
* @return tunnel id
*/
public int getId();
/**
* The type of tunnel. this may currently only be
* <code>Tunnel.LOCAL_TUNNEL</code> or <code>Tunnel.REMOTE_TUNNEL</code>.
*
* @return tunnel type
*/
public int getType();
/**
* Get if this tunnel should be automatically started when the user logs in.
*
* @return <code>true</code> if autostart tunnel upon login
*/
public boolean isAutoStart();
/**
* Get the transport protocol to tunnel. Currently
* <code>Tunnel.TCP_TUNNEL</code> and <code>Tunnel.UDP_TUNNEL</code> are
* supported.
*
* @return transport protocol
*/
public String getTransport();
/**
* Get the user that this tunnel is attached to, or an empty styring if this
* is a global tunnel to be configured for all users.
*
* @return user id
*/
public String getUsername();
/**
* Get the port that a listener should be opened up on.
*
* @return source port
*/
public int getSourcePort();
/**
* Get the port that should be forward to
*
* @return destination port
*/
public int getDestinationPort();
/**
* Get the host that should be forward to
*
* @return destination host
*/
public String getDestinationHost();
/**
* Get if external hosts may be allowed to use the tunnel
*
* @return allow external hosts
*/
public boolean isAllowExternalHosts();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -