如何编写简单的SMPP服务器
我想编写一个简单的 SMPP 服务器,基本上将流量转发到另一个 SMPP 服务器(C#、PHP)。我需要知道哪些事情?我该如何继续?
I want to write a simple SMPP Server that basically forwards traffic to another SMPP server (C#, PHP). What are the things I need to know? How do I proceed?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
关于 Goran 的评论,一种可能的解决方案是简单的 tcp 代理,例如 simpleproxy。
来自 Ubuntu 软件包描述:
With regards to Goran's comment, one possible solution would be a simple tcp proxy such as simpleproxy.
From the Ubuntu package description:
Olaseni,
我过去做过类似的事情,但我使用的是 perl。我所做的是使用从 Accata.com 下载的端口转发代理。 (port-proxy.pl)
我对此进行了修改,以在读取传入套接字时使用 NET::SMPP 模块来验证 PDU。一旦 PDU 的类型为“Bind_request”,我将针对数据库进行验证,如果验证成功则替换凭据,然后转发,或者如果凭据未验证,则向客户端发出拒绝并断开连接。或者,如果 PDU 包含其他内容,我将使用 port-proxy.pl 中已存在的逻辑进行转发。
Olaseni,
I've done something similar in the past, but i used perl. What i did was taking a port forwarding proxy which i downloaded from accordata.com. (port-proxy.pl)
I modified this to use the NET::SMPP module to validate PDU's when reading the incoming socket. Once the PDU was of type "Bind_request" i would validate against a dbase, replace credentials if validation was successfull and than forward or if credentials were not validated, issue a reject to the client and disconnect. Alternatively if the PDU contained anything else, i would forward using the logic that was already existing in port-proxy.pl.
您可以编写简单的 smpp lib 并将 smpp 流量从许多应用程序转发到与 SMS 提供商的一个 smpp 连接
我可以建议您使用 jsmpp lib,但它适用于 java。这是非常简单和酷的库。许多低级事情发生在幕后,您可以专注于业务逻辑
在此处查找更多信息
You can write simple smpp lib and forward smpp traffic from many applications to the one smpp connection to the sms provider
I can advice you jsmpp lib, but it's for java. It's very simple and cool lib. Many low level things happen behind the scenes and you can focus on your business logic
Find more here
我已经在 vb.net 中准确地写出了您所要求的内容,
我所做的是监听入站 PDU(连接、绑定、短信和断开连接),唯一地识别每个入站连接 - 对于身份验证位,
然后我将流量转发到发送短信。
您的 SMPP 服务只需要侦听入站 PDU 数据包...以及将心跳数据包发送到连接的客户端(如果需要)。
I have written exactly what you are asking for in vb.net
What i did was listen for inbound PDU (connect, bind, sms, and disconnect too) identifying each inbound connection uniquely - for the authentication bit,
then i forward the traffic onward to the delivery smsc.
Your SMPP service simply needs to listen for inbound PDU packets... as well as send heartbeat packets to the connected clients, if required.