Sorunome / mx-puppet-instagram

An instagram matrix puppeting bridge
Apache License 2.0
30 stars 13 forks source link

Config.yaml? #6

Closed DoM1niC closed 4 years ago

DoM1niC commented 4 years ago

I wanne setup this Bridge but I missed the config.yaml the buildung was success and so on but it seems the config is currently not included ?

Sorunome commented 4 years ago

There's one in the bridge library here https://github.com/Sorunome/mx-puppet-bridge/blob/master/sample.config.yaml that should work

DoM1niC commented 4 years ago

OMG THX!!! I will try it nice work :) btw

DoM1niC commented 4 years ago

I tried it but I got this error :(

Mar-18 11:54:13.263 [PuppetBridge] error: Failed to load config file TypeError:                                                                                                                                                              Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at Config.applyConfig (/home/projects/python/mx-puppet-instagram/build/node_                                                                                                                                                             modules/mx-puppet-bridge/lib/src/config.js:31:16)
    at Object.keys.forEach (/home/projects/python/mx-puppet-instagram/build/node                                                                                                                                                             _modules/mx-puppet-bridge/lib/src/config.js:33:22)
    at Array.forEach (<anonymous>)
    at Config.applyConfig (/home/projects/python/mx-puppet-instagram/build/node_                                                                                                                                                             modules/mx-puppet-bridge/lib/src/config.js:31:32)
    at PuppetBridge.readConfig (/home/projects/python/mx-puppet-instagram/build/                                                                                                                                                             node_modules/mx-puppet-bridge/lib/src/puppetbridge.js:82:25)
    at PuppetBridge.<anonymous> (/home/projects/python/mx-puppet-instagram/build                                                                                                                                                             /node_modules/mx-puppet-bridge/lib/src/puppetbridge.js:101:18)
    at Generator.next (<anonymous>)
    at /home/projects/python/mx-puppet-instagram/build/node_modules/mx-puppet-br                                                                                                                                                             idge/lib/src/puppetbridge.js:20:71
    at new Promise (<anonymous>)
    at __awaiter (/home/projects/python/mx-puppet-instagram/build/node_modules/m                                                                                                                                                             x-puppet-bridge/lib/src/puppetbridge.js:16:12)
    at PuppetBridge.init (/home/projects/python/mx-puppet-instagram/build/node_m                                                                                                                                                             odules/mx-puppet-bridge/lib/src/puppetbridge.js:100:16)
    at /home/projects/python/mx-puppet-instagram/build/index.js:74:22
    at Generator.next (<anonymous>)
    at /home/projects/python/mx-puppet-instagram/build/index.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (/home/projects/python/mx-puppet-instagram/build/index.js:4:12)
    at run (/home/projects/python/mx-puppet-instagram/build/index.js:73:12)
    at Object.<anonymous> (/home/projects/python/mx-puppet-instagram/build/index                                                                                                                                                             .js:203:1)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
python@webapps:~/mx-puppet-instagram/build$

Config

bridge:
  # Address for the bridge to bind to; if running as a Docker container, you
  # probably want 0.0.0.0 here
  bindAddress: localhost
  # Port to host the bridge on which your homeserver will connect to
  port: 8002
  # Name of your homeserver
  domain: matrix.3dns.eu
  # URL where the bridge can connect to your homeserver
  homeserverUrl: http://localhost:8008
  # Optionally specify a different media URL used for the media store
  #mediaURL: https://external-url.org
  # This enabled automatic double-puppeting:
  # A map for shared secrets of the homeserver URL to the shared secret
  # See https://github.com/devture/matrix-synapse-shared-secret-auth
  #loginSharedSecretMap:
  #  yourserver.com: supersecretsharedsecret
  # optionally override the display name of the bridge bot
  #displayname: Protocol Bot
  # optionally set the avatar of the bridge bot
  #avatarUrl: mxc://yourserver.com/somefile
  # optionally enable group synchronisation.
  # Needs synapse config "enable_group_creation" set to true
  #enableGroupSync: true

logging:
  # Log level of console output
  # Allowed values starting with most verbose:
  # silly, debug, verbose, info, warn, error
  console: info
  # Optionally, you can apply filters to the console logging
  #console:
  #  level: info
  #  enabled:
  #    - Store
  #  disabled:
  #    - PresenceHandler

  # Date and time formatting
  lineDateFormat: MMM-D HH:mm:ss.SSS
  # Logging files
  # Log files are rotated daily by default
  files:
    # Log file path
    - file: "bridge.log"
      # Log level for this file
      # Allowed values starting with most verbose:
      # silly, debug, verbose, info, warn, error
      level: info
      # Date and time formatting
      datePattern: YYYY-MM-DD
      # Maximum number of logs to keep.
      # This can be a number of files or number of days.
      # If using days, add 'd' as a suffix
      maxFiles: 14d
      # Maximum size of the file after which it will rotate. This can be a
      # number of bytes, or units of kb, mb, and gb. If using the units, add
      # 'k', 'm', or 'g' as the suffix
      maxSize: 50m
      # Optionally enable/disable logging for certain modules
      #disabled:
      #  - PresenceHandler
      #  - module: bot-sdk-MatrixLiteClient
      #    regex: /_matrix/client/r0/presence/ # this regex needs to match to disable the log
      #enabled:
      #  - Store

database:
  # Use Postgres as a database backend
  # If set, will be used instead of SQLite3
  # Connection string to connect to the Postgres instance
  # with username "user", password "pass", host "localhost" and database name "dbname".
  # Modify each value as necessary
  #connString: "postgres://user:pass@localhost/dbname?sslmode=disable"
  # Use SQLite3 as a database backend
  # The name of the database file
  filename: database.db

provisioning:
  # Regex of Matrix IDs allowed to use the puppet bridge
  whitelist:
    # Allow a specific user
    #- "@user:server\\.com"
    # Allow users on a specific homeserver
    - "@.*:matrix.3dns\\.eu"
    # Allow anyone
    #- ".*"
  # Regex of Matrix IDs forbidden from using the puppet bridge
  #blacklist:
    # Disallow a specific user
    #- "@user:server\\.com"
    # Disallow users on a specific homeserver
    #- "@.*:yourserver\\.com"

presence:
  # Bridge online/offline status
  enabled: true
  # How often to send status to the homeserver in milliseconds
  interval: 500

relay:
  # Enable/Disable relay bridging mode
  enabled: false
  # Regex of Matrix IDs to allow to use the relay mode
  # Same format as in provisioning
  whitelist:
    - "@.*:yourserver\\.com"
  #blacklist:
    #- "@user:yourserver\\.com"

# Map certain homeserver URLs to the C-S API endpoint
# Useful for double-puppeting if .well-known is unavailable for some reason
#homeserverUrlMap:
#  yourserver.com: http://localhost:1234

namePatterns:
  # Override the protocols set default name patterns
  # Which variables are available depends on protocol implementation
  user: :name
  userOverride: :name
  room: :name
  group: :name

limits:
  # Up to how many users should be auto-joined on room creation? -1 to disable
  # Defaults to 200
  #maxAutojoinUsers: 200
  # How long the delay between two autojoin users should be, in millisectonds.
  # Defaults to 5000
  #roomUserAutojoinDelay: 5000
Sorunome commented 4 years ago

try soemthing more minimalistic like

bridge:
  port: 8435
  domain: localhost
  homeserverUrl: http://localhost:8008
logging:
  console: info
provisioning:
  whitelist:
   - ".*"

maybe?

EDIT: adjust localhost to your stuffs, ofc. And the whitelist

DoM1niC commented 4 years ago

try soemthing more minimalistic like

bridge:
  port: 8435
  domain: localhost
  homeserverUrl: http://localhost:8008
logging:
  console: info
provisioning:
  whitelist:
   - ".*"

maybe?

EDIT: adjust localhost to your stuffs, ofc. And the whitelist

yeah I got the registration file now and will try it what I have to do if I run the bridge to sign my insta account in?

The Bridge is fully running now !

DoM1niC commented 4 years ago

now I need to know how I use your pupped I already use Mautrix WA / FB Bridge, but here I lost so much instructions because this seems fully in development :(

Sorunome commented 4 years ago

You create a room and invite @_instagrampuppet_bot:yourserver.com. Once it joins that should be your status room. You can type help to list all available commands. what you are looking for is link <username> <password>

While this bridge sadly lacks documentation it should be fully functional already

DoM1niC commented 4 years ago

You create a room and invite @_instagrampuppet_bot:yourserver.com. Once it joins that should be your status room. You can type help to list all available commands. what you are looking for is link <username> <password>

While this bridge sadly lacks documentation it should be fully functional already

I try it now

Whats about this error after 2nd start the pupped ? [bot-sdk-MatrixLiteClient] error: (REQ-1) { errcode: 'M_USER_IN_USE', error: 'User ID already taken.' }

DoM1niC commented 4 years ago

its still in invitation process here :( image

Sorunome commented 4 years ago

Whats about this error after 2nd start the pupped ? [bot-sdk-MatrixLiteClient] error: (REQ-1) { errcode: 'M_USER_IN_USE', error: 'User ID already taken.' }

That error is safe to ignore

Sorunome commented 4 years ago

its still in invitation process here :( image

Sounds like synapse isn't communicating with the appservice. Would you mind joining #mx-puppet-bridge:sorunome.de for easier debugging?