Technical

All technical archives.


[TOC] 一、前言 1。我的Django APP(omserver)有在settings.py里启用csrf_token middleware 2。在我的所有form里都有加{% csrf_token %}标签代码里有两种方式的POST,1)有form: 直接将整个form serialize(),然后 ajax submit 2)没有form: 3。在开发环境跑所有功能都OK。 4。开发环境和部署环境的一个差别1)开发环境访问后台是直接连接后台的django地址:http://localhost:8000/omserver2)部署环境访问后台是跟前端共用了一个域名:https://x.rg4.net ,然后这个域名再通过nginx反向代码分别跳转到前台(http://localhost:3000)和后台(http://localhost:8000/omserver) 二、各种尝试 尝试1:怀疑是不是过nginx后,cookie丢失?nginx反向路由加一些头 结果:没用,403依旧。 尝试2:怀疑csrf token没传到django?在我的app里加一个 middleware,拦截所有的request,并将其内容打出来以确认 django有没有收到前端传过来的csrf token 1)先在我的app omserver下创建一个middleware.py,然后加入以下代码 2)将这个middleware加入到settings.py 结果:django有收到前端传过来的csrf token,但就是403 这里打印出来的csrfmiddlewaretoken值,与我在前面javascript ajax post时打印出来的值是一毛一样的,为什么报错? 尝试3:分析csrf.py代码,将校验过程打印出来 1)拿到检验错误原因为:{“detail”:”CSRF Failed: Origin checking failed – https://x.rg4.net does not match any trusted origins.”}2)重新修改settings.py,将前面禁用掉的csrf middleware重新打开 同时在settings.py里加入 这个时候报错变成了 注:中间有碰到一个新问题,刷新前端界面报错 […]

[未解决]将xiaoluo-3d部署到公网后,出现所有POST都报403错误


Forwarded from: https://howdoesinternetwork.com/2016/quantum-key-distribution ——————————- QKD – Quantum key distribution is the magic part of quantum cryptography. Every other part of this new cryptography mechanism remains the same as in standard cryptography techniques currently used. By using quantum particles which behave under rules of quantum mechanics, keys can be generated and distributed to […]

QKD – How Quantum Cryptography Key Distribution Works




Sympton: ——————————————- TE40 caller : 202.102.40.211, E.164: 02510000 TE40 caller : 192.168.0.109,  E.164: 02510000 H600 callee : 192.168.0.105,  E.164: 654320 VP9650: 202.102.40.219 Pcap file was captured on H600 side. All exchanged signaling commands between H600 and VP9650: ->SCI <-SCR,facility ->setup <-ARQ ->ACF <-alerting,connect ->facility ->TCS …Twenty seconds later… –>ReleaseComplete, DRQ […]

An issue when collaborating with HUAWEI VP9650 with H.460



Both ZTE T800 and HUAWEI TEx0 claim to have T.140 supported, but when I digging into these entities by running some tests between T800, TE40 and TE60, my current status is I’m not persuaded. Maybe only because I don’t know how to configure them to make T.140 enabled. Here is some T.140 related information, and my steps to analysis to the protocols of HUAWEI TEx0 and ZTE T800. A screen shot of HUAWEI TEx0’s administration manual about T.140. Source: http://support.huawei.com/ehedex/pages/DOC1000063904NZD1231E/01/DOC1000063904NZD1231E/01/resources/webhlp/te_webhlp_00005.html#te_webhlp_00005__tb5 1. T.140 related standard documents 1)T-REC-H.323-200002-S!AnnG!PDF-E.pdf 2)T-REC-H.224-200501-I!!PDF-E.pdf 3)T-REC-T.140-199802-I!!PDF-E.pdf 5)T-REC-T.140-200002-I!Add1!PDF-E.pdf 6)RFC4103 – RTP Payload for Text Conversation.pdf 2. Major descriptions of implementing T.140 T.140 related descriptions in T-REC-H.323-200002-S!AnnG!PDF-E. 1) H.245 TCS for T.140 In the capabilities exchange, when using a reliable channel, specify: DataApplicationCapability.application = t140 DataProtocolCapability = tcp In the capabilities exchange, when using an unreliable channel, specify: DataApplicationCapability.application = t140 DataProtocolCapability = udp 2) H.245 Open Logical Channel In the Open Logical Channel procedure, specify: OpenLogicalChannel.forwardLogicalChannelParameters = dataType DataType = data And select a reliable or unreliable channel for the transfer of T.140 data by specifying the DataApplicationCapability and the DataProtocolCapability as above. According to the description in T-REC-H.224-200501-I!!PDF-E, there should be only one H.221 channel, we can still send multiple protocols, like FECC, T.120 and T.140, in one single channel, this type of channel has a name: H.221 MLP data channel. 3) Packetization of T.140 data Reliable TCP mode: skipped because don’t find any newlly established TCP connections. UnReliable mode: I do find an H.224 capability in both of these entities, since there is no OLC requests other than Audio, Video, and H.224 data. Let’s suppose they are re-using the H.221 MLP data channel for both FECC and T.140 transmission. 4) H.224 protocol octet structure 5) H.224 -Standard Client ID Table 3. H.224 data packets sending between TE60 and T800 I managed to extract the H.224 data packets from the PCAP file. And they are like these: 7e 7e 7e 00 86 c0 00 00 00 00 00 03 40 00 81 a8 e8 0f b2 07 db 07 9f 9f 9f bf ff Explain the packet by the standard document’s description: […]

Does ZTE T800 and HUAWEI TEx0 support T.140?



5
Got mails continuously from everywhere throwing question to me about AAC audio in H.323. So I arranged this post to example my previous posts: http://rg4.net/archives/1480.html, http://rg4.net/archives/1126.html, http://rg4.net/archives/1112.html The pcap file for this example can be downloaded here: HUAWEI_TE600-vs-ZTE_T800.pcapnp Here it is. 1. Basic knowledge: AAC LD descriptions in 14496-3 It operates at up […]

An example of AAC capability in H.245


The VLC media player includes file cache and stream buffer options to enable fine-grained control over video playback on machines with limited system resources. If you use VLC to stream network video, you can set the buffer size on a per-stream or permanent basis. For local file playback, you can […]

How to Change the Buffer on VLC


As you may know, to be a robust meeting entity, we must take good care of compatibility requirements for different facilities from different manufacturers. In H.323 protocol, we can use fields like Vendor ID, Product ID, Version ID in the signaling commands. But how to do this when you are using SIP protocol? Definitions in RFC 3261 20.35 Server    The Server header field contains information about the software used    by the UAS to handle the request.    Revealing the specific software version of the server might allow the    server to become more vulnerable to attacks against software that is    known to contain security holes. Implementers SHOULD make the Server    header field a configurable option.    Example:       Server: HomeServer v2 20.41 User-Agent    The User-Agent header field contains information about the UAC    originating the request.  The semantics of this header field are    defined in [H14.43].    Revealing the specific software version of the user agent might allow    the user agent to become more vulnerable to attacks against software    that is known to contain security holes.  Implementers SHOULD make    the User-Agent header field a configurable option.    Example:       User-Agent: Softphone Beta1.5     [H14.43] User-Agent definition in RFC2616 14.43 User-Agent The User-Agent request-header field contains information about the user agent originating the request. This is for statistical purposes, the tracing of protocol violations, and automated recognition of user agents for the sake of tailoring responses to avoid particular user agent limitations. User agents SHOULD include this field with requests. The field can contain multiple product tokens (section 3.8) and comments identifying the agent and any subproducts which form a significant part of the user agent. By convention, the product tokens are listed in order of their significance for identifying the application. User-Agent     = “User-Agent” “:” 1*( product | comment ) Example: User-Agent: CERN-LineMode/2.15 libwww/2.17b3     How TANDBERG and Polycom implemented? TANDBERG: POLYCOM: So, jump to the conclusion: As UAC, identify yourself in User-Agent field. As UAS, identify yourself in Server field. Comparing with TANDBERG and POLYCOM’s implementation, TANDBERG format is more proper.

Vendor ID, Product ID information in SIP





Most of the missing features are AVPF related, which is defined in RFC4585 and RFC5104. RFC4585: Extended RTP Profile for Real-time Transport Control Protocol (RTCP)-Based Feedback (RTP/AVPF) https://www.rfc-editor.org/rfc/rfc4585.txt RFC5104:  Codec Control Messages in the RTP Audio-Visual Profile with Feedback (AVPF) https://www.rfc-editor.org/rfc/rfc5104.txt AVPF contains a mechanism for conveying such a message, […]

RTCP and AVPF related missing features