A9VG电玩部落论坛

 找回密码
 注册
搜索
查看: 3743|回复: 8

[咨询] [咨询]ps3 proxy server的一个传送问题

[复制链接]

精华
0
帖子
41
威望
0 点
积分
41 点
种子
6 点
注册时间
2005-12-14
最后登录
2021-8-24
 楼主| 发表于 2009-9-22 21:52  ·  江苏 | 显示全部楼层 |阅读模式
今天刚入手ps3 slim,研究了一下ps3 proxy server,明白这款软件的作用就在于***到ps store的demo文件的实际地址,然后可以通过flashget等工具下载到电脑上。先感叹下国人的智慧。
我有个问题,对于像论坛直接给出的demo下载地址,比如我用flashget下到了本地电脑,该怎么传送到ps3上去呢,举个实例,中午我在公司下载了country=HK的铁拳5的demo,用U盘考回家里的电脑上,现在登录到ps store,发现demo里并没有这个铁拳5的游戏,那我怎么传输到ps3上呢?再或者我下载了一个country=us的天剑,在ps3 proxy server里做好替换的设置,我是不是一定要登录us的PS store,然后找到天剑的demo,然后下载呢?
刚接触ps3,希望各位达人不吝指教,谢谢!.
该用户已被禁言

精华
0
帖子
1577
威望
0 点
积分
2033 点
种子
0 点
注册时间
2008-7-5
最后登录
2012-4-4
发表于 2009-9-22 22:05  ·  江苏 | 显示全部楼层
你得先有那个DEMO的下载记录 才能把电脑下好的文件 传回PS3

圣骑士

GT饭

精华
0
帖子
2480
威望
0 点
积分
3140 点
种子
236 点
注册时间
2008-7-31
最后登录
2025-2-26
发表于 2009-9-22 22:12  ·  北京 | 显示全部楼层
如果你知道地址的话,你直接下载好,然后添加一条url与本地地址的记录。

设置好代理后,进入store直接下载。然后就会自动从你pc上下了,速度很快。我下demo,如果不在家都会在论坛问一下地址是什么。然后直接下。

精华
0
帖子
41
威望
0 点
积分
41 点
种子
6 点
注册时间
2005-12-14
最后登录
2021-8-24
 楼主| 发表于 2009-9-22 22:34  ·  江苏 | 显示全部楼层
我的意思是比如我添加的是铁拳5的url和本地地址的记录后,然后进store,是不是一定要选定铁拳5的图标才能下载,还是随便选哪个demo游戏然后点下载,就会把本地的传送过去。

精华
0
帖子
1007
威望
0 点
积分
1475 点
种子
5 点
注册时间
2005-9-11
最后登录
2015-3-22
发表于 2009-9-22 22:51  ·  上海 | 显示全部楼层
ps3 proxy server其实就是一个网关。通过建立了一个特殊的HttpClient类监听PS3发送过来的数据包。并且把地址复制出来。实时检查Replace项中有没有该地址对应的本地文件。如果有则将本地文件作为响应的数据包回送。说到底就是一个自动替换链接的网关。
  1. ///处理逻辑
  2. private void ProcessQuery(string Query)
  3.           {
  4.               this.HeaderFields = this.ParseQuery(Query);
  5.               if ((this.HeaderFields == null) || !this.HeaderFields.ContainsKey("Host"))
  6.               {
  7.                    this.SendBadRequest();
  8.               }
  9.               else
  10.               {
  11.                    int num;
  12.                    string requestedPath;
  13.                    int index;
  14.                    if (this.HttpRequestType.ToUpper().Equals("CONNECT"))
  15.                    {
  16.                         index = this.RequestedPath.IndexOf(":");
  17.                         if (index >= 0)
  18.                         {
  19.                             requestedPath = this.RequestedPath.Substring(0, index);
  20.                             if (this.RequestedPath.Length > (index + 1))
  21.                             {
  22.                                  num = int.Parse(this.RequestedPath.Substring(index + 1));
  23.                             }
  24.                             else
  25.                             {
  26.                                  num = 0x1bb;
  27.                             }
  28.                         }
  29.                         else
  30.                         {
  31.                             requestedPath = this.RequestedPath;
  32.                             num = 0x1bb;
  33.                         }
  34.                    }
  35.                    else
  36.                    {
  37.                         index = this.HeaderFields["Host"].IndexOf(":");
  38.                         if (index > 0)
  39.                         {
  40.                             requestedPath = this.HeaderFields["Host"].Substring(0, index);
  41.                             num = int.Parse(this.HeaderFields["Host"].Substring(index + 1));
  42.                         }
  43.                         else
  44.                         {
  45.                             requestedPath = this.HeaderFields["Host"];
  46.                             num = 80;
  47.                         }
  48.                         if (this.HttpRequestType.ToUpper().Equals("POST"))
  49.                         {
  50.                             int num3 = Query.IndexOf("rnrn");
  51.                             this.m_HttpPost = Query.Substring(num3 + 4);
  52.                         }
  53.                    }
  54.                     //关键代码,使用LocalFile.MatchFile方法遍历Replace中的动态添加的自定义控件中是否存在与这个this.RequestedURL字符串变量相符的URL字符串,如果存在则在下面发送这个本地文件给请求者(PS3)。
  55.                    string localFile = LocalFile.MatchFile(this.RequestedURL);
  56.                    //是否存在HTTP 200的“CONNECT”字样。
  57.                    if (!this.HttpRequestType.ToUpper().Equals("CONNECT") && (localFile != string.Empty))
  58.                    {
  59.                         //发送本地文件,这个方法里会有一个调用
  60.                         this.SendLocalFile(localFile);
  61.                         this.updataLogMsg(this.RequestedURL, localFile);
  62.                    }
  63.                    else
  64.                    {
  65.                         this.updataLogMsg(this.RequestedURL, string.Empty);
  66.                         try
  67.                         {
  68.                             IPEndPoint remoteEP = new IPEndPoint(Dns.Resolve(requestedPath).AddressList[0], num);
  69.                             base.DestinationSocket = new Socket(remoteEP.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
  70.                             if (this.HeaderFields.ContainsKey("Proxy-Connection") && this.HeaderFields["Proxy-Connection"].ToLower().Equals("keep-alive"))
  71.                             {
  72.                                  base.DestinationSocket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.KeepAlive, 1);
  73.                             }
  74.                             base.DestinationSocket.BeginConnect(remoteEP, new AsyncCallback(this.OnConnected), base.DestinationSocket);
  75.                         }
  76.                         catch
  77.                         {
  78.                             this.SendBadRequest();
  79.                         }
  80.                    }
  81.               }
  82.           }
  83.         private void SendLocalFile(string localFile)
  84.         {
  85.             this.m_LocalFile = new LocalFile(localFile);
  86.                                 //告诉PS3,你的请求已经找到了,200状态的意思是可以连接。
  87.             string format = "HTTP/1.1 200 OKrnDate:{0}rnConnection: closernContent-Length: {1}rnAccept-Ranges: bytesrnLast-Modified:{2}rnrn";
  88.             format = string.Format(format, DateTime.Now, this.m_LocalFile.Filesize, this.m_LocalFile.LastModified);
  89.             try
  90.             {
  91.                                            //开始通过ClientSocket发送本地的数据
  92.                 base.ClientSocket.BeginSend(Encoding.ASCII.GetBytes(format), 0, format.Length, SocketFlags.None, new AsyncCallback(this.OnLocalFileSent), base.ClientSocket);
  93.             }
  94.             catch
  95.             {
  96.                                            //如果传输上发生异常了,对不起,吧父类和自己都给销毁掉。哈哈
  97.                 base.Dispose();
  98.             }
  99.         }
复制代码

精华
0
帖子
260
威望
0 点
积分
275 点
种子
17 点
注册时间
2006-1-6
最后登录
2025-1-8
发表于 2009-9-22 22:52  ·  广东 | 显示全部楼层
真复杂!!!!!!!!!!!!!!!!!!

精华
1
帖子
3497
威望
1 点
积分
4701 点
种子
18 点
注册时间
2006-11-17
最后登录
2025-2-17
发表于 2009-9-22 22:53  ·  湖南 | 显示全部楼层
下面是引用ecapslock于2009-09-22 22:34发表的:
我的意思是比如我添加的是铁拳5的url和本地地址的记录后,然后进store,是不是一定要选定铁拳5的图标才能下载,还是随便选哪个demo游戏然后点下载,就会把本地的传送过去。

对,一定要PSN上有的才能传,下架的就不行了

精华
0
帖子
344
威望
0 点
积分
350 点
种子
0 点
注册时间
2007-12-12
最后登录
2010-6-16
发表于 2009-9-22 23:07  ·  贵州 | 显示全部楼层
铁拳5是付费游戏 需要验证 你必须要付费  下载这个图标  然后替换
不是付费需要验证的  你就可以  找个最大DEMO的游戏图标  然后可以用 比这个DEMO容量小的  其他DEMO替换  
反正  实际游戏的容量  不能大于  图标指示的DEMO的容量

精华
0
帖子
41
威望
0 点
积分
41 点
种子
6 点
注册时间
2005-12-14
最后登录
2021-8-24
 楼主| 发表于 2009-9-23 10:03  ·  江苏 | 显示全部楼层
4楼强人,谢谢各位
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|A9VG电玩部落 川公网安备 51019002005286号

GMT+8, 2025-2-27 04:32 , Processed in 0.207056 second(s), 16 queries , Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

返回顶部