Coder Social home page Coder Social logo

Comments (10)

jqqqqqqqqqq avatar jqqqqqqqqqq commented on June 1, 2024 1

不是, cqsocketapi不是我的项目,我只是拿来用
原作者写的就是127.0.0.1,我觉得OK,所以没改

用0.0.0.0会不会暴露公网取决于你的iptables 规则怎么写

from unifiedmessagerelay.

jqqqqqqqqqq avatar jqqqqqqqqqq commented on June 1, 2024

推荐这么做,不然暴露端口的话docker 的 ip 不一定是固定的,我这里有时候是172.17.0.2有时候是172.17.0.3

想把 bot 放外边需要重新编译一个监听0.0.0.0的 cqsocketapi,否则不得不放在 docker 内

from unifiedmessagerelay.

Z4HD avatar Z4HD commented on June 1, 2024

但是您考虑到如果Socket API监听0.0.0.0的话可能会意外将Socket API暴露至外网因此编译了监听172.0.0.1的版本?

from unifiedmessagerelay.

Z4HD avatar Z4HD commented on June 1, 2024

多谢解答

from unifiedmessagerelay.

Z4HD avatar Z4HD commented on June 1, 2024

from unifiedmessagerelay.

jqqqqqqqqqq avatar jqqqqqqqqqq commented on June 1, 2024

我觉得我 readme 提到了把 bot 放到 docker 里啊
只是没有强调一下,我改改

from unifiedmessagerelay.

Z4HD avatar Z4HD commented on June 1, 2024

from unifiedmessagerelay.

jqqqqqqqqqq avatar jqqqqqqqqqq commented on June 1, 2024

当然可以在 docker 外运行,会写 iptables 就行

from unifiedmessagerelay.

jqqqqqqqqqq avatar jqqqqqqqqqq commented on June 1, 2024

举个例子,在 docker 里搞这个
iptables -t nat -I PREROUTING -i eth0 -p udp --dport 11235 -j DNAT --to-destination 127.0.0.1
当然不保证能用,我只是举个例子

from unifiedmessagerelay.

Z4HD avatar Z4HD commented on June 1, 2024

@jqqqqqqqqqq
不错,值得一试。
让您回复了这么多,麻烦您了。

from unifiedmessagerelay.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.