📄 12 - securing drb services with access control lists.rb
字号:
#!/usr/bin/ruby# acl_hash_server.rbrequire 'drb'require 'drb/acl'# Setup the security--remember to call before DRb.start_service()DRb.install_acl(ACL.new(%w{ deny all allow 192.168.1.* allow 127.0.0.1 } ) )# Start up DRb with a URI and a hash to shareshared_hash = {:server => 'Some data set by the server' }DRb.start_service("druby://127.0.0.1:61676", shared_hash)puts 'Listening for connection...'DRb.thread.join # Wait on DRb thread to exit...#---
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -