English 中文(简体)
dns-sd:如何人工登记远程服务
原标题:dns-sd: how to manually register a remote service

我在另一个遥远的系统上服务,这个系统位于另一个物理网络,其多节目包没有进入我的当地系统,因此,我看不到其国家航空航天局出版的服务。

我可以在当地机器上人工登记,以便只显示国家航天中心-SD发现服务的应用程序能够显示其情况?

问题回答

在Avahi临时登记之后,可使用avahi-publish进行,而通过撰写固定服务档案,可以建立这种登记。 See man 1 avahi-publish for more on the former and man 5 avahi.service for more on the subsequently.

有了Bonjour,便可使用黄色工具代用登记服务:

dns-sd -P <Name> <Type> <Domain> <Port> <Host> <IP> [< HFT>......]

如果重新注册的代理机构已经有一个统一的英国广播公司所在地点,那么这样的地址将:

$ dns-sd -P Google _http._tcp local 80 google.com google.com path=/
Registering Service Google._http._tcp.local host google.com port 80 TXT path=/
 4:23:00.928  Got a reply for service Google._http._tcp.local.: Name now registered and active
^C

如果没有东道国名称,东道国就应当使用独一无二的名称:

$ dns-sd -P Google _http._tcp local 80 google.local 74.125.237.144 path=/
Registering Service Google._http._tcp.local host google.local port 80 TXT path=/
 4:16:48.208  Got a reply for record google.local: Name now registered and active
 4:16:48.208  Got a reply for service Google._http._tcp.local.: Name now registered and active
^C

这正是我所期待的。 我想在家庭网络外发现的非SX系统上安装一个服务。 在座的其他地方,我发现我如何利用玩弄方法,来发现我回到我的Mac网络:

echo show Setup:/Network/BackToMyMac | scutil | sed -n  s/.* : *(.*).$/1/p  

So I can take that and use it to populate this:

BTMM=`echo show Setup:/Network/BackToMyMac | scutil | sed -n  s/.* : *(.*).$/1/p `

dns-sd -P <advertised host name> _ssh._tcp ${BTMM} 22 <real host name> <real IP address—could be a hostname if it resolves> path=/

其优点是,只要零家庭的某些变量正在运行,我就不必记住在离开家园之前做任何事情。 我可以从我所处任何地方刊登远程服务广告,然后使用这一广告。 因此,我掌管指挥,然后看着我的壳牌——和;新遥控指挥方言,在那里。 然后,我可以把档案复制到和浏览,管理指挥,进入家庭网络,就像我在那里一样。





相关问题
Does Bonjour networking work on ppc running 10.4?

I developed an application for Mac 10.5 desktop which communicates with iPhone over wifi using Bonjour service, and it is working fine on Mac 10.5 and able to do required syncing with iPhone over wifi ...

iPhone SDK: phone to phone file transfer

What is the simpliest approach to copy files from iPhone to iPhone (p2p). The only way I can come up is this: Use Bonjour to discover server app (which will advertize itself via Bonjour) Use ...

cannot run java app on mac properly

I have small problem..I created a java App in windows and my .jar consist of whole app..i copied this jar file to mac and executed it from there it works fine.. Java App consists of bonjour code if i ...

Is there a Bonjour SDK for Windows?

I want to know how to implement bonjour on windows, so that i can set up server on windows and access files in windows(server) using bonjour service from my iphone(client). Can anyone tell me whether ...

Secure iPhone-Desktop Connection

Background There are a lot of App Store released iPhone apps that require an IP based server on the desktop so that the iPhone can connect to the desktop as a client. For example, there are many ...

How do I build a DNS Query record in Erlang?

I am building a native Bonjour / Zeroconf library and need to build DNS query records to broadcast off to the other machines. I have tried looking thru the Erlang source code but as I am relatively ...

热门标签