/*
This file is part of Socks via HTTP.
This package 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.
Socks via HTTP 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 Socks via HTTP; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
// Title : FrameAppli.java
// Version : 0.40
// Copyright : Copyright (c) 2001
// Author : Florent CUETO (fcueto@wanadoo.fr)
// Description : GUI
package socks4;
import java.awt.*;
import java.awt.event.*;
public class FrameAppli extends Frame implements Output
{
private static final String PROPERTIES_FILE = "socks4.init";
private java.text.SimpleDateFormat dateFormat = new java.text.SimpleDateFormat("[HH:mm]");
private ConnectionServer srv = null;
TextField textField1 = new TextField();
Label label1 = new Label();
Label label2 = new Label();
TextField textField2 = new TextField();
Checkbox checkbox1 = new Checkbox();
Label label3 = new Label();
Label label4 = new Label();
TextField textField3 = new TextField();
TextField textField4 = new TextField();
Button button1 = new Button();
Button button2 = new Button();
TextField textField5 = new TextField();
Label label5 = new Label();
Label label6 = new Label();
TextField textField6 = new TextField();
TextArea textArea1 = new TextArea();
Button button3 = new Button();
Checkbox checkbox2 = new Checkbox();
Checkbox checkbox3 = new Checkbox();
TextField textField7 = new TextField();
Label label7 = new Label();
TextField textField8 = new TextField();
Label label8 = new Label();
Button button4 = new Button();
public FrameAppli()
{
try
{
jbInit();
}
catch(Exception e)
{
e.printStackTrace();
}
initIconCorner("icon.jpg");
Log.output = this;
// Welcome message
Log.printLog(Const.APPLICATION_NAME + " v" + Const.APPLICATION_VERSION + " starting...");
initProp();
Log.printLog(Const.APPLICATION_NAME + " v" + Const.APPLICATION_VERSION + " ready...");
}
private void jbInit() throws Exception
{
this.setSize(760, 386);
textField1.setBounds(new Rectangle(56, 38, 331, 26));
this.setLayout(null);
label1.setText("URL");
label1.setBounds(new Rectangle(17, 38, 35, 25));
label2.setText("PORT");
label2.setBounds(new Rectangle(13, 77, 38, 24));
textField2.setBounds(new Rectangle(55, 77, 62, 25));
checkbox1.setBackground(Color.lightGray);
checkbox1.setLabel("Use proxy");
checkbox1.setBounds(new Rectangle(32, 168, 103, 28));
checkbox1.addItemListener(new java.awt.event.ItemListener()
{
public void itemStateChanged(ItemEvent e)
{
checkbox1_itemStateChanged(e);
}
});
label3.setText("Proxy Host");
label3.setBounds(new Rectangle(11, 200, 65, 23));
label4.setText("Proxy Port");
label4.setBounds(new Rectangle(9, 231, 65, 23));
textField3.setEnabled(false);
textField3.setBounds(new Rectangle(77, 197, 305, 28));
textField4.setEnabled(false);
textField4.setBounds(new Rectangle(77, 229, 65, 29));
button1.setLabel("Start");
button1.setBounds(new Rectangle(308, 344, 84, 29));
button1.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(ActionEvent e)
{
button1_actionPerformed(e);
}
});
this.addWindowListener(new java.awt.event.WindowAdapter()
{
public void windowClosing(WindowEvent e)
{
this_windowClosing(e);
}
});
this.setBackground(Color.lightGray);
this.setTitle(Const.APPLICATION_NAME + " v" + Const.APPLICATION_VERSION);
this.setResizable(false);
button2.setEnabled(false);
button2.setLabel("Stop");
button2.setBounds(new Rectangle(215, 344, 84, 29));
button2.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(ActionEvent e)
{
button2_actionPerformed(e);
}
});
textField5.setEnabled(false);
textField5.setBounds(new Rectangle(77, 262, 305, 28));
label5.setText("Username");
label5.setBounds(new Rectangle(11, 265, 65, 23));
label6.setText("Password");
label6.setBounds(new Rectangle(9, 297, 65, 23));
textField6.setEchoChar('*');
textField6.setEnabled(false);
textField6.setBounds(new Rectangle(77, 294, 305, 29));
textArea1.setEditable(false);
textArea1.setBounds(new Rectangle(402, 37, 340, 301));
button3.setLabel("Clear");
button3.setBounds(new Rectangle(658, 344, 84, 29));
button3.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(ActionEvent e)
{
button3_actionPerformed(e);
}
});
checkbox2.setBackground(Color.lightGray);
checkbox2.setLabel("Only allow connections from localhost");
checkbox2.setBounds(new Rectangle(138, 75, 248, 28));
checkbox2.addItemListener(new java.awt.event.ItemListener()
{
public void itemStateChanged(ItemEvent e)
{
checkbox2_itemStateChanged(e);
}
});
checkbox3.setBackground(Color.lightGray);
checkbox3.setEnabled(false);
checkbox3.setLabel("Proxy needs authentication");
checkbox3.setBounds(new Rectangle(165, 230, 179, 28));
checkbox3.addItemListener(new java.awt.event.ItemListener()
{
public void itemStateChanged(ItemEvent e)
{
checkbox3_itemStateChanged(e);
}
});
textField7.setBounds(new Rectangle(55, 118, 120, 29));
label7.setText("User");
label7.setBounds(new Rectangle(19, 121, 33, 24));
textField8.setEchoChar('*');
textField8.setBounds(new Rectangle(269, 118, 115, 30));
label8.setText("Password");
label8.setBounds(new Rectangle(206, 122, 63, 24));
button4.setLabel("About");
button4.setBounds(new Rectangle(568, 345, 84, 29));
button4.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(ActionEvent e)
{
button4_actionPerformed(e);
}
});
this.add(textField1, null);
this.add(label2, null);
this.add(textField2, null);
this.add(label1, null);
this.add(textArea1, null);
this.add(checkbox2, null);
this.add(checkbox1, null);
this.add(label3, null);
this.add(textField3, null);
this.add(textField4, null);
this.add(textField5, null);
this.add(label5, null);
this.add(textField6, null);
this.add(label6, null);
this.add(label4, null);
this.add(checkbox3, null);
this.add(button3, null);
this.add(button1, null);
this.add(button2, null);
this.add(textField7, null);
this.add(label7, null);
this.add(textField8, null);
this.add(label8, null);
this.add(button4, null);
}
void button1_actionPerformed(ActionEvent e)
{
// START Button
// Disable the start button
button1.setEnabled(false);
// Start the server
startServer();
// Enable the stop button
button2.setEnabled(true);
}
void this_windowClosing(WindowEvent e)
{
// The user close the window
// Stop the server
stopServer();
// Exit
System.exit(0);
}
void checkbox1_itemStateChanged(ItemEvent e)
{
textField3.setEnabled(checkbox1.getState());
textField4.setEnabled(checkbox1.getState());
// Enable the "proxy needs authentication" checkbox
checkbox3.setEnabled(checkbox1.getState());
textField5.setEnabled(checkbox1.getState() && checkbox3.getState());
textField6.setEnabled(checkbox1.getState() && che
没有合适的资源?快使用搜索试试~ 我知道了~
Socks via HTTP v0.40(http2socks)
共86个文件
class:41个
java:31个
properties:2个
5星 · 超过95%的资源 需积分: 50 60 下载量 138 浏览量
2004-11-12
10:46:49
上传
评论
收藏 0B RAR 举报
温馨提示
SOCK VIA HTTP是通过HTTP建立通道的SOCK,由JAVA编写。
资源推荐
资源详情
资源评论
收起资源包目录
20041112105646.rar (86个子文件)
Socks.via.HTTP_0.40
client.bat 126B
DOCUMENTATION 5KB
client.sh 125B
server.sh 148B
server.bat 149B
README 980B
INSTALL 2KB
classes
jhttpserver
ServletConfigImpl.class 1KB
HttpServletResponseImpl.class 8KB
JHttpServer.class 5KB
ServletInputStreamImpl.class 843B
JHttpServerThread.class 6KB
ServletContextImpl.class 4KB
HttpServletRequestImpl.class 9KB
CachedFile.class 2KB
ServletOutputStreamImpl.class 1KB
ServletTest.class 2KB
ServletSendFile.class 7KB
socks4
ServletSocks.class 8KB
UserList.class 745B
ServletAdmin.class 5KB
Const.class 1KB
SocksPacket.class 3KB
FrameAppli$3.class 498B
ExtendedConnection.class 987B
initsrv.properties 2KB
HttpMessage.class 4KB
PropertiesFileReader.class 881B
FrameAppli$2.class 530B
ConnectionServer.class 2KB
ConnectionTable.class 1KB
FrameAppli$8.class 530B
DataPacket.class 457B
FrameAppli$6.class 530B
FrameAppli$1.class 530B
FrameAppli$5.class 530B
Connection.class 3KB
Output.class 142B
FrameAppli$4.class 530B
FrameAppli$7.class 530B
StdoutOutput.class 411B
Log.class 786B
Base64Encoder.class 2KB
FrameAppli.class 9KB
DiskAccess.class 1KB
UserInfo.class 1KB
Client.class 578B
ThreadPing.class 2KB
ThreadCommunication.class 4KB
init.properties 2KB
servlet.jar 40KB
COPYRIGHT 150B
icon.jpg 852B
sources
jhttpserver
CachedFile.java 2KB
ServletConfigImpl.java 2KB
JHttpServerThread.java 7KB
HttpServletResponseImpl.java 7KB
ServletOutputStreamImpl.java 2KB
ServletInputStreamImpl.java 2KB
ServletSendFile.java 9KB
ServletContextImpl.java 4KB
HttpServletRequestImpl.java 8KB
JHttpServer.java 4KB
ServletTest.java 3KB
socks4
Output.java 985B
HttpMessage.java 9KB
PropertiesFileReader.java 2KB
DataPacket.java 1KB
ConnectionTable.java 2KB
ServletAdmin.java 6KB
Const.java 2KB
ServletSocks.java 11KB
ExtendedConnection.java 2KB
SocksPacket.java 3KB
Base64Encoder.java 5KB
ThreadCommunication.java 9KB
Log.java 1KB
ConnectionServer.java 3KB
StdoutOutput.java 1KB
FrameAppli.java 12KB
DiskAccess.java 2KB
Client.java 1KB
Connection.java 5KB
ThreadPing.java 3KB
COPYING 18KB
HISTORY 2KB
共 86 条
- 1
资源评论
- sing200920092017-09-24遇到错误: String index out of range: -2
- sandrew2013-01-23非常好用,解决了我很大的问题
- livyhoney2017-06-20非常好用,收藏一下
microrain
- 粉丝: 1125
- 资源: 598
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功