�����ߥ󥰤Τ褤���Ȥˡ�11���������Ρ�Winny�Ļ벽�Τ��ᡢWeb�֥饦����Winny�ץ��ȥ���ϥ�ɥ��פ��Ф��ơ���������Winny�ץ��ȥ���ϥ�ɥ��̯���פȤ���ȿ�������ä���
���������ʤ� winnytp://a272e2d2e7a6844d97ab5fd9619be1d6 �Ȥ���URI�ǡ��ͥåȥ���Τɤ����ˤ��� a272e2d2e7a6844d97ab5fd9619be1d6 �Ȥ����ϥå���Υե������ؤ��Τ������ʤ󤸤�ʤ����ȡ�
������Winny�ץ��ȥ���ϥ�ɥ��̯��, blog.fuktommy.com, 2006ǯ6��25��
�٤Ĥˤ���˸��ꤵ�����ͳ�Ϥʤ���ξ������������Ȥ��������Τ��Ȥ��� URL (Uniform Resource Locator) �Ȥ��ơ�������ꤷ�ƥ꥽��������ꤹ����ˡ��winnytp://HOSTNAME:PORT/[FILE_ID]�פ⤢��С� URN (Uniform Resource Name) �Ȥ��ơ����˰�¸���ʤ����ǥ꥽��������ꤹ����ˡ��winny:FILE_ID�פ⤢������Ȥ�������Ǥ褤��*1
���ñ�ˡ���Ԥμ����ˤ϶�̣���ʤ���
�������̤��餤����Winny�ץ��ȥ���ˤϼ�ʬ�θ����ե�����ΰ�������Ϥ��뵡ǽ�Ϥʤ��ä��Ȼפ���Ǥ����ɡ� Apache�Ǥ����� Options -Indexes �����ꤷ�Ƥ���褦�ʤ��Ǥ��硣�Ȥ������Ȥ� winnytp://192.168.2.1:7743/foo.jpg �Ϥ��ꤨ�Ƥ� winnytp://192.168.2.1:7743/ �Ϥʤ��󤸤�ʤ��Ǥ�����
������Winny�ץ��ȥ���ϥ�ɥ��̯��, blog.fuktommy.com, 2006ǯ6��25��
�٤Ĥ����ե����뤬ɽ�������ɬ�פϤʤ������Υ����Ȥ�������������ޥ��13���顢���Υ����ȤˤĤ��ƤΥ���ȥ����Ф�������Ǥ褤�ΤǤ��äơ���Options -Indexes�פ���Ƥ���櫓����ʤ���
���Ĥϸ����Ф������顢���줬�Ǥ��뤫�ɤ������������ԳΤ��˴����Ƥ����������ǡ����礦�ɺ������顢�ºݤ˺�äƻ�Ƥ����Ȥ������ä���
Java��java.net.URLConnection�ѤΥ��ȥ꡼��ϥ�ɥ��ڤ��񤤤Ƥߤ����Ȥ����ϼ��Τ褦�ʴ����ˤʤ롣Java�ǽ񤤤�������̤�Web�֥饦�����Ȥ߹��ळ�ȤϤǤ������ˤʤ�����HotJava�ˤʤ�Ǥ��뤱�ɤ�ˡ������Ǥϥƥ����ȥ١�����HTML�֥饦����Java�ǽ񤯥����������ꤷ�Ƥ��롣�ʥ���������ɵ�ǽ�Ϥޤ��񤤤Ƥ��ʤ��Τǡ�[FILE_ID]����ʬ�ϻ��ꤷ�Ƥ�̵�뤵��롣��
import java.net.URL; import java.io.*; public class Nynx { static final String usage = "Usage: java Nynx url"; public static void main(String[] args) { if (args.length != 1) { System.err.println(usage); System.exit(1); } String url = args[0]; URL.setURLStreamHandlerFactory(new WinnytpURLStreamHandlerFactory()); // �ϥ�ɥ���Ȥ߹��� try { java.net.URLConnection uc = new URL(url).openConnection(); InputStream is = uc.getInputStream(); BufferedReader buf = new BufferedReader(new InputStreamReader(is)); while (true) { String line = buf.readLine(); if (line == null) break; System.out.println(line); } } catch (IOException e) { System.err.println(e.toString()); } } } class WinnytpURLStreamHandlerFactory implements java.net.URLStreamHandlerFactory { public java.net.URLStreamHandler createURLStreamHandler(String protocol) { if (protocol.equals("winnytp")) { return new WinnytpURLStreamHandler(); } else { return null; } } } class WinnytpURLStreamHandler extends java.net.URLStreamHandler {...} class WinnytpURLConnection extends java.net.URLConnection {...}
�¹Ԥ��Ƥߤ�ȼ��Τ褦�ˤʤ롣��1�ϼ�������γ�ǧ�ƥ��ȤǼ¹Ԥ����ݤ��ͻҤǡ������������ޥ��13�Υ���ȥ���餺��ɽ�������ͻҤ���
�������顢HOST_NAME��ʬ�����������襵���ȤȰ��פ��륨��ȥ�ʿ�1�������ʬ�ˤ�����Ĥ���ɽ������Ф褯���¹Ԥ���ȿ�2�Τ褦�ˤʤä����ʥ�󥯤�href°���ϡ�����URL�ˤʤ�Τǡ�winnytp://HOSTNAME:PORT/����ʬ���ά���Ƥ��롣��
���ΤȤ��������餫�饵���С�Winny�Ρ��ɡˤؤϲ��饳�ޥ�ɤ�ǡ������������Ƥ��ʤ���Winny�ץ��ȥ�����Ƭ�ΰŹæ¥ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½Ó¥ï¿½ï¿½Þ¥ï¿½ï¿½0��3�����äƤ��ʤ��ˡ������κǽ�Υƥ��ȤǤ��Τ��Ȥ˵��Ť����Τ�����ñ�ˤ����餫�� TCP��³���������ǡ��������ȥ꡼��˥��ޥ��13�ʤɤ��֤��Ƥ���褦�������������ǡ�����Winny�ץ��ȥ���ˤ������äƥǥ����ɤ��������ǡ����Τ褦��ɽ�����Ǥ�����
�������������ˤ�ͼ������ñ¤»Ï¤á¤¿ï¿½È¤ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½Ë¤ï¿½Ä«ï¿½Ë¤Ï¤ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½Ù¤ï¿½Æ°ï¿½ï¿½ï¿½ï¿½Î¤Ë»Å¾å¤¬ï¿½Ã¤ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½Î¤ï¿½ï¿½È¤ï¿½ï¿½é¤·ï¿½Æ¤â¡¢ï¿½ï¿½ï¿½ï¿½Ã¯ï¿½Ç¤â¡¢ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½Æ¤ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½È¤Ë¤ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½×¥ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½Ç¤ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½Ë¤ï¿½ï¿½ë¤³ï¿½È¤ï¿½ï¿½ï¤«ï¿½ë¡£ï¿½ÂºÝ¡ï¿½5��15����CMU���ܹ��Υ���ե�������ʤǤ⡢��줫��μ���ǡ֡ʾ���ϳ���к��Ȥ��ơˤ����Ǥ��äƤ���פȤ��������ФƤ�����
Winny�ˤĤ��Ƥ���ޤǤ˹ͤ��òµ¤ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½
*1 ���Τ���虜�虜��tp�פ��դ��ƶ��̤��Ƥ�������